Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip a couple ServiceManager tests when running Java 8 on Windows. #6738

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package com.google.common.util.concurrent;

import static com.google.common.base.StandardSystemProperty.JAVA_SPECIFICATION_VERSION;
import static com.google.common.base.StandardSystemProperty.OS_NAME;
import static com.google.common.truth.Truth.assertThat;
import static com.google.common.util.concurrent.MoreExecutors.directExecutor;
import static java.util.Arrays.asList;
Expand Down Expand Up @@ -121,6 +123,10 @@ protected void doStop() {
}

public void testServiceStartupTimes() {
if (isWindows() && isJava8()) {
// Flaky there: https://github.com/google/guava/pull/6731#issuecomment-1736298607
return;
}
Service a = new NoOpDelayedService(150);
Service b = new NoOpDelayedService(353);
ServiceManager serviceManager = new ServiceManager(asList(a, b));
Expand Down Expand Up @@ -639,4 +645,12 @@ public void failure(Service service) {
failedServices.add(service);
}
}

private static boolean isWindows() {
return OS_NAME.value().startsWith("Windows");
}

private static boolean isJava8() {
return JAVA_SPECIFICATION_VERSION.value().equals("1.8");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package com.google.common.util.concurrent;

import static com.google.common.base.StandardSystemProperty.JAVA_SPECIFICATION_VERSION;
import static com.google.common.base.StandardSystemProperty.OS_NAME;
import static com.google.common.truth.Truth.assertThat;
import static com.google.common.util.concurrent.MoreExecutors.directExecutor;
import static java.util.Arrays.asList;
Expand Down Expand Up @@ -122,6 +124,10 @@ protected void doStop() {
}

public void testServiceStartupTimes() {
if (isWindows() && isJava8()) {
// Flaky there: https://github.com/google/guava/pull/6731#issuecomment-1736298607
return;
}
Service a = new NoOpDelayedService(150);
Service b = new NoOpDelayedService(353);
ServiceManager serviceManager = new ServiceManager(asList(a, b));
Expand All @@ -133,6 +139,10 @@ public void testServiceStartupTimes() {
}

public void testServiceStartupDurations() {
if (isWindows() && isJava8()) {
// Flaky there: https://github.com/google/guava/pull/6731#issuecomment-1736298607
return;
}
Service a = new NoOpDelayedService(150);
Service b = new NoOpDelayedService(353);
ServiceManager serviceManager = new ServiceManager(asList(a, b));
Expand Down Expand Up @@ -651,4 +661,12 @@ public void failure(Service service) {
failedServices.add(service);
}
}

private static boolean isWindows() {
return OS_NAME.value().startsWith("Windows");
}

private static boolean isJava8() {
return JAVA_SPECIFICATION_VERSION.value().equals("1.8");
}
}
Loading