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:
Brian Muramatsu
2012-06-08 16:45:02 -07:00
parent fb1b2d0923
commit 28ca76b84d

View File

@@ -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() {