Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,15 @@ public void startWithHttp401PreventsSubsequentStart() throws Exception {

assertNotNull(callback1.awaitError());

// The background thread calls resultCallback.onError() before setting
// connection401Error and calling dataSourceUpdateSink.shutDown(), so
// we need to wait for shutDown to complete before testing the second start.
long deadline = System.currentTimeMillis() + 1000;
while (!dataSourceUpdateSink.shutDownCalled && System.currentTimeMillis() < deadline) {
Thread.sleep(10);
}
assertTrue(dataSourceUpdateSink.shutDownCalled);

// Second start should be a no-op due to connection401Error flag
TrackingCallback callback2 = new TrackingCallback();
sds.start(callback2);
Expand Down
Loading