Skip to content

Commit

Permalink
remote: fix flakiness of HttpBlobStoreTest on Windows.
Browse files Browse the repository at this point in the history
Increase the connect timeout to 30 seconds Windows sometimes
seems to need more time.

RELNOTES: None
PiperOrigin-RevId: 188702864
  • Loading branch information
buchgr authored and Copybara-Service committed Mar 12, 2018
1 parent 6586621 commit b33e5af
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ private void expiredAuthTokensShouldBeRetried_get(ErrorType errorType) throws Ex

Credentials credentials = newCredentials();
HttpBlobStore blobStore =
new HttpBlobStore(new URI("http://localhost:" + serverPort), 5, credentials);
new HttpBlobStore(new URI("http://localhost:" + serverPort), 30, credentials);
ByteArrayOutputStream out = Mockito.spy(new ByteArrayOutputStream());
blobStore.get("key", out);
assertThat(out.toString(Charsets.US_ASCII.name())).isEqualTo("File Contents");
Expand Down Expand Up @@ -125,7 +125,7 @@ private void expiredAuthTokensShouldBeRetried_put(ErrorType errorType) throws Ex

Credentials credentials = newCredentials();
HttpBlobStore blobStore =
new HttpBlobStore(new URI("http://localhost:" + serverPort), 5, credentials);
new HttpBlobStore(new URI("http://localhost:" + serverPort), 30, credentials);
byte[] data = "File Contents".getBytes(Charsets.US_ASCII);
ByteArrayInputStream in = new ByteArrayInputStream(data);
blobStore.put("key", data.length, in);
Expand Down Expand Up @@ -153,7 +153,7 @@ private void errorCodeThatShouldNotBeRetried_get(ErrorType errorType)

Credentials credentials = newCredentials();
HttpBlobStore blobStore =
new HttpBlobStore(new URI("http://localhost:" + serverPort), 5, credentials);
new HttpBlobStore(new URI("http://localhost:" + serverPort), 30, credentials);
blobStore.get("key", new ByteArrayOutputStream());
fail("Exception expected.");
} catch (Exception e) {
Expand All @@ -180,7 +180,7 @@ private void errorCodeThatShouldNotBeRetried_put(ErrorType errorType)

Credentials credentials = newCredentials();
HttpBlobStore blobStore =
new HttpBlobStore(new URI("http://localhost:" + serverPort), 5, credentials);
new HttpBlobStore(new URI("http://localhost:" + serverPort), 30, credentials);
blobStore.put("key", 1, new ByteArrayInputStream(new byte[] {0}));
fail("Exception expected.");
} catch (Exception e) {
Expand Down

0 comments on commit b33e5af

Please sign in to comment.