Flip condition in ApacheHttpClientTest
Make sure to wait first and then check the expected state rather than check the expected state first and then waiting. Bug 6293413 Change-Id: Ibcb1127b935708c51fafdc8624cb3a7eefc01bda
This commit is contained in:
@@ -200,7 +200,7 @@ public class ApacheHttpClientTest extends AndroidTestCase {
|
||||
}
|
||||
|
||||
public boolean waitForStateChange() throws InterruptedException {
|
||||
return hasExpectedState() || mReceiveLatch.await(30, TimeUnit.SECONDS);
|
||||
return mReceiveLatch.await(30, TimeUnit.SECONDS) || hasExpectedState();
|
||||
}
|
||||
|
||||
private boolean hasExpectedState() {
|
||||
|
||||
Reference in New Issue
Block a user