Skip to content

Commit

Permalink
Stop skipping certain AbstractFutureTest tests under Windows.
Browse files Browse the repository at this point in the history
Fixes #6563

Progress toward #2130

RELNOTES=n/a
PiperOrigin-RevId: 541947282
  • Loading branch information
ineuwirth authored and Google Java Core Libraries committed Jun 20, 2023
1 parent 4354c12 commit 36e7fcf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,6 @@ public void testToString_allUnique() throws Exception {
}

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

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

public void testFutureBash() {
if (isWindows()) {
return; // TODO: b/136041958 - Some tests in this file are slow, but I'm not sure which.
return; // TODO: b/136041958 - Running very slowly on Windows CI.
}
final CyclicBarrier barrier =
new CyclicBarrier(
Expand Down Expand Up @@ -631,7 +622,7 @@ public void run() {
// setFuture and cancel() interact in more complicated ways than the other setters.
public void testSetFutureCancelBash() {
if (isWindows()) {
return; // TODO: b/136041958 - Some tests in this file are slow, but I'm not sure which.
return; // TODO: b/136041958 - Running very slowly on Windows CI.
}
final int size = 50;
final CyclicBarrier barrier =
Expand Down Expand Up @@ -768,9 +759,6 @@ public void run() {
// Test to ensure that when calling setFuture with a done future only setFuture or cancel can
// return true.
public void testSetFutureCancelBash_withDoneFuture() {
if (isWindows()) {
return; // TODO: b/136041958 - Some tests in this file are slow, but I'm not sure which.
}
final CyclicBarrier barrier =
new CyclicBarrier(
2 // for the setter threads
Expand Down Expand Up @@ -854,9 +842,6 @@ public void run() {
// In a previous implementation this would cause a stack overflow after ~2000 futures chained
// together. Now it should only be limited by available memory (and time)
public void testSetFuture_stackOverflow() {
if (isWindows()) {
return; // TODO: b/136041958 - Some tests in this file are slow, but I'm not sure which.
}
SettableFuture<String> orig = SettableFuture.create();
SettableFuture<String> prev = orig;
for (int i = 0; i < 100000; i++) {
Expand All @@ -874,9 +859,6 @@ public void testSetFuture_stackOverflow() {
@GwtIncompatible
@AndroidIncompatible
public void testSetFutureToString_stackOverflow() {
if (isWindows()) {
return; // TODO: b/136041958 - Some tests in this file are slow, but I'm not sure which.
}
SettableFuture<String> orig = SettableFuture.create();
SettableFuture<String> prev = orig;
for (int i = 0; i < 100000; i++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,6 @@ public void testToString_allUnique() throws Exception {
}

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

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

public void testFutureBash() {
if (isWindows()) {
return; // TODO: b/136041958 - Some tests in this file are slow, but I'm not sure which.
return; // TODO: b/136041958 - Running very slowly on Windows CI.
}
final CyclicBarrier barrier =
new CyclicBarrier(
Expand Down Expand Up @@ -631,7 +622,7 @@ public void run() {
// setFuture and cancel() interact in more complicated ways than the other setters.
public void testSetFutureCancelBash() {
if (isWindows()) {
return; // TODO: b/136041958 - Some tests in this file are slow, but I'm not sure which.
return; // TODO: b/136041958 - Running very slowly on Windows CI.
}
final int size = 50;
final CyclicBarrier barrier =
Expand Down Expand Up @@ -768,9 +759,6 @@ public void run() {
// Test to ensure that when calling setFuture with a done future only setFuture or cancel can
// return true.
public void testSetFutureCancelBash_withDoneFuture() {
if (isWindows()) {
return; // TODO: b/136041958 - Some tests in this file are slow, but I'm not sure which.
}
final CyclicBarrier barrier =
new CyclicBarrier(
2 // for the setter threads
Expand Down Expand Up @@ -854,9 +842,6 @@ public void run() {
// In a previous implementation this would cause a stack overflow after ~2000 futures chained
// together. Now it should only be limited by available memory (and time)
public void testSetFuture_stackOverflow() {
if (isWindows()) {
return; // TODO: b/136041958 - Some tests in this file are slow, but I'm not sure which.
}
SettableFuture<String> orig = SettableFuture.create();
SettableFuture<String> prev = orig;
for (int i = 0; i < 100000; i++) {
Expand All @@ -874,9 +859,6 @@ public void testSetFuture_stackOverflow() {
@GwtIncompatible
@AndroidIncompatible
public void testSetFutureToString_stackOverflow() {
if (isWindows()) {
return; // TODO: b/136041958 - Some tests in this file are slow, but I'm not sure which.
}
SettableFuture<String> orig = SettableFuture.create();
SettableFuture<String> prev = orig;
for (int i = 0; i < 100000; i++) {
Expand Down

0 comments on commit 36e7fcf

Please sign in to comment.