aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Jakob Buchgraber <buchgr@google.com>2018-06-26 05:37:08 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-06-26 05:38:47 -0700
commit315e5b19c004e4a9ed1cbee1f085d734746a1c9e (patch)
tree5cae178d3e71b14158f30a4c11cdc7a5baf2193e
parent5013a3323cb462c1e445e5f8b11bed39fb29f7fc (diff)
remote: enable previously ignored tests
the tests had been disabled for flakyness due to timeouts. I think the right solution is remove the individual test timeouts as on a highly loaded machine fine grained timeouts typically don't make much sense. After removing the individual test timeouts no more flakyness was found in 1000 runs. Closes #5465. PiperOrigin-RevId: 202113697
-rw-r--r--src/test/java/com/google/devtools/build/lib/remote/ByteStreamUploaderTest.java21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/remote/ByteStreamUploaderTest.java b/src/test/java/com/google/devtools/build/lib/remote/ByteStreamUploaderTest.java
index d48f2981b2..7b2dc7aefb 100644
--- a/src/test/java/com/google/devtools/build/lib/remote/ByteStreamUploaderTest.java
+++ b/src/test/java/com/google/devtools/build/lib/remote/ByteStreamUploaderTest.java
@@ -68,7 +68,6 @@ import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
-import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
@@ -133,8 +132,7 @@ public class ByteStreamUploaderTest {
retryService.shutdownNow();
}
- @Ignore // TODO(buchgr): This test is so flaky that it fails three times in a row on Bazel CI.
- @Test(timeout = 10000)
+ @Test
public void singleBlobUploadShouldWork() throws Exception {
Context prevContext = withEmptyMetadata.attach();
RemoteRetrier retrier =
@@ -205,8 +203,7 @@ public class ByteStreamUploaderTest {
withEmptyMetadata.detach(prevContext);
}
- @Ignore
- @Test(timeout = 20000)
+ @Test
public void multipleBlobsUploadShouldWork() throws Exception {
Context prevContext = withEmptyMetadata.attach();
RemoteRetrier retrier =
@@ -214,7 +211,7 @@ public class ByteStreamUploaderTest {
() -> new FixedBackoff(1, 0), (e) -> true, retryService, Retrier.ALLOW_ALL_CALLS);
ByteStreamUploader uploader = new ByteStreamUploader(INSTANCE_NAME, channel, null, 3, retrier);
- int numUploads = 100;
+ int numUploads = 10;
Map<String, byte[]> blobsByHash = new HashMap<>();
List<Chunker> builders = new ArrayList<>(numUploads);
Random rand = new Random();
@@ -389,7 +386,7 @@ public class ByteStreamUploaderTest {
withEmptyMetadata.detach(prevContext);
}
- @Test(timeout = 10000)
+ @Test
public void sameBlobShouldNotBeUploadedTwice() throws Exception {
// Test that uploading the same file concurrently triggers only one file upload.
@@ -452,7 +449,7 @@ public class ByteStreamUploaderTest {
withEmptyMetadata.detach(prevContext);
}
- @Test(timeout = 10000)
+ @Test
public void errorsShouldBeReported() throws IOException, InterruptedException {
Context prevContext = withEmptyMetadata.attach();
RemoteRetrier retrier =
@@ -482,7 +479,7 @@ public class ByteStreamUploaderTest {
withEmptyMetadata.detach(prevContext);
}
- @Test(timeout = 10000)
+ @Test
public void shutdownShouldCancelOngoingUploads() throws Exception {
Context prevContext = withEmptyMetadata.attach();
RemoteRetrier retrier =
@@ -540,7 +537,7 @@ public class ByteStreamUploaderTest {
withEmptyMetadata.detach(prevContext);
}
- @Test(timeout = 10000)
+ @Test
public void failureInRetryExecutorShouldBeHandled() throws Exception {
Context prevContext = withEmptyMetadata.attach();
ListeningScheduledExecutorService retryService =
@@ -576,7 +573,7 @@ public class ByteStreamUploaderTest {
withEmptyMetadata.detach(prevContext);
}
- @Test(timeout = 10000)
+ @Test
public void resourceNameWithoutInstanceName() throws Exception {
Context prevContext = withEmptyMetadata.attach();
RemoteRetrier retrier =
@@ -616,7 +613,7 @@ public class ByteStreamUploaderTest {
withEmptyMetadata.detach(prevContext);
}
- @Test(timeout = 10000)
+ @Test
public void nonRetryableStatusShouldNotBeRetried() throws Exception {
Context prevContext = withEmptyMetadata.attach();
RemoteRetrier retrier =