Skip to content

Commit 36e7fcf

Browse files
ineuwirthGoogle Java Core Libraries
authored and
Google Java Core Libraries
committed
Stop skipping certain AbstractFutureTest tests under Windows.
Fixes #6563 Progress toward #2130 RELNOTES=n/a PiperOrigin-RevId: 541947282
1 parent 4354c12 commit 36e7fcf

File tree

2 files changed

+4
-40
lines changed

2 files changed

+4
-40
lines changed

android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,6 @@ public void testToString_allUnique() throws Exception {
218218
}
219219

220220
public void testToString_oom() throws Exception {
221-
if (isWindows()) {
222-
return; // TODO: b/136041958 - Some tests in this file are slow, but I'm not sure which.
223-
}
224221
SettableFuture<Object> future = SettableFuture.create();
225222
future.set(
226223
new Object() {
@@ -300,9 +297,6 @@ public String pendingToString() {
300297
@SuppressWarnings({"DeprecatedThreadMethods", "ThreadPriorityCheck"})
301298
@AndroidIncompatible // Thread.suspend
302299
public void testToString_delayedTimeout() throws Exception {
303-
if (isWindows()) {
304-
return; // TODO: b/136041958 - Some tests in this file are slow, but I'm not sure which.
305-
}
306300
Integer javaVersion = Ints.tryParse(JAVA_SPECIFICATION_VERSION.value());
307301
// Parsing to an integer might fail because Java 8 returns "1.8" instead of "8."
308302
// We can continue if it's 1.8, and we can continue if it's an integer in [9, 20).
@@ -392,9 +386,6 @@ public String pendingToString() {
392386
}
393387

394388
public void testCompletionFinishesWithDone() {
395-
if (isWindows()) {
396-
return; // TODO: b/136041958 - Some tests in this file are slow, but I'm not sure which.
397-
}
398389
ExecutorService executor = Executors.newFixedThreadPool(10);
399390
for (int i = 0; i < 50000; i++) {
400391
final AbstractFuture<String> future = new AbstractFuture<String>() {};
@@ -447,7 +438,7 @@ public void run() {
447438

448439
public void testFutureBash() {
449440
if (isWindows()) {
450-
return; // TODO: b/136041958 - Some tests in this file are slow, but I'm not sure which.
441+
return; // TODO: b/136041958 - Running very slowly on Windows CI.
451442
}
452443
final CyclicBarrier barrier =
453444
new CyclicBarrier(
@@ -631,7 +622,7 @@ public void run() {
631622
// setFuture and cancel() interact in more complicated ways than the other setters.
632623
public void testSetFutureCancelBash() {
633624
if (isWindows()) {
634-
return; // TODO: b/136041958 - Some tests in this file are slow, but I'm not sure which.
625+
return; // TODO: b/136041958 - Running very slowly on Windows CI.
635626
}
636627
final int size = 50;
637628
final CyclicBarrier barrier =
@@ -768,9 +759,6 @@ public void run() {
768759
// Test to ensure that when calling setFuture with a done future only setFuture or cancel can
769760
// return true.
770761
public void testSetFutureCancelBash_withDoneFuture() {
771-
if (isWindows()) {
772-
return; // TODO: b/136041958 - Some tests in this file are slow, but I'm not sure which.
773-
}
774762
final CyclicBarrier barrier =
775763
new CyclicBarrier(
776764
2 // for the setter threads
@@ -854,9 +842,6 @@ public void run() {
854842
// In a previous implementation this would cause a stack overflow after ~2000 futures chained
855843
// together. Now it should only be limited by available memory (and time)
856844
public void testSetFuture_stackOverflow() {
857-
if (isWindows()) {
858-
return; // TODO: b/136041958 - Some tests in this file are slow, but I'm not sure which.
859-
}
860845
SettableFuture<String> orig = SettableFuture.create();
861846
SettableFuture<String> prev = orig;
862847
for (int i = 0; i < 100000; i++) {
@@ -874,9 +859,6 @@ public void testSetFuture_stackOverflow() {
874859
@GwtIncompatible
875860
@AndroidIncompatible
876861
public void testSetFutureToString_stackOverflow() {
877-
if (isWindows()) {
878-
return; // TODO: b/136041958 - Some tests in this file are slow, but I'm not sure which.
879-
}
880862
SettableFuture<String> orig = SettableFuture.create();
881863
SettableFuture<String> prev = orig;
882864
for (int i = 0; i < 100000; i++) {

guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,6 @@ public void testToString_allUnique() throws Exception {
218218
}
219219

220220
public void testToString_oom() throws Exception {
221-
if (isWindows()) {
222-
return; // TODO: b/136041958 - Some tests in this file are slow, but I'm not sure which.
223-
}
224221
SettableFuture<Object> future = SettableFuture.create();
225222
future.set(
226223
new Object() {
@@ -300,9 +297,6 @@ public String pendingToString() {
300297
@SuppressWarnings({"DeprecatedThreadMethods", "ThreadPriorityCheck"})
301298
@AndroidIncompatible // Thread.suspend
302299
public void testToString_delayedTimeout() throws Exception {
303-
if (isWindows()) {
304-
return; // TODO: b/136041958 - Some tests in this file are slow, but I'm not sure which.
305-
}
306300
Integer javaVersion = Ints.tryParse(JAVA_SPECIFICATION_VERSION.value());
307301
// Parsing to an integer might fail because Java 8 returns "1.8" instead of "8."
308302
// We can continue if it's 1.8, and we can continue if it's an integer in [9, 20).
@@ -392,9 +386,6 @@ public String pendingToString() {
392386
}
393387

394388
public void testCompletionFinishesWithDone() {
395-
if (isWindows()) {
396-
return; // TODO: b/136041958 - Some tests in this file are slow, but I'm not sure which.
397-
}
398389
ExecutorService executor = Executors.newFixedThreadPool(10);
399390
for (int i = 0; i < 50000; i++) {
400391
final AbstractFuture<String> future = new AbstractFuture<String>() {};
@@ -447,7 +438,7 @@ public void run() {
447438

448439
public void testFutureBash() {
449440
if (isWindows()) {
450-
return; // TODO: b/136041958 - Some tests in this file are slow, but I'm not sure which.
441+
return; // TODO: b/136041958 - Running very slowly on Windows CI.
451442
}
452443
final CyclicBarrier barrier =
453444
new CyclicBarrier(
@@ -631,7 +622,7 @@ public void run() {
631622
// setFuture and cancel() interact in more complicated ways than the other setters.
632623
public void testSetFutureCancelBash() {
633624
if (isWindows()) {
634-
return; // TODO: b/136041958 - Some tests in this file are slow, but I'm not sure which.
625+
return; // TODO: b/136041958 - Running very slowly on Windows CI.
635626
}
636627
final int size = 50;
637628
final CyclicBarrier barrier =
@@ -768,9 +759,6 @@ public void run() {
768759
// Test to ensure that when calling setFuture with a done future only setFuture or cancel can
769760
// return true.
770761
public void testSetFutureCancelBash_withDoneFuture() {
771-
if (isWindows()) {
772-
return; // TODO: b/136041958 - Some tests in this file are slow, but I'm not sure which.
773-
}
774762
final CyclicBarrier barrier =
775763
new CyclicBarrier(
776764
2 // for the setter threads
@@ -854,9 +842,6 @@ public void run() {
854842
// In a previous implementation this would cause a stack overflow after ~2000 futures chained
855843
// together. Now it should only be limited by available memory (and time)
856844
public void testSetFuture_stackOverflow() {
857-
if (isWindows()) {
858-
return; // TODO: b/136041958 - Some tests in this file are slow, but I'm not sure which.
859-
}
860845
SettableFuture<String> orig = SettableFuture.create();
861846
SettableFuture<String> prev = orig;
862847
for (int i = 0; i < 100000; i++) {
@@ -874,9 +859,6 @@ public void testSetFuture_stackOverflow() {
874859
@GwtIncompatible
875860
@AndroidIncompatible
876861
public void testSetFutureToString_stackOverflow() {
877-
if (isWindows()) {
878-
return; // TODO: b/136041958 - Some tests in this file are slow, but I'm not sure which.
879-
}
880862
SettableFuture<String> orig = SettableFuture.create();
881863
SettableFuture<String> prev = orig;
882864
for (int i = 0; i < 100000; i++) {

0 commit comments

Comments
 (0)