[java] annotation does not work for unit test because we don't use our custom runner for such tests
package org.openqa.selenium.grid.node.config;
import static org.assertj.core.api.Assertions.assertThat;
+import static org.junit.Assume.assumeFalse;
import static org.junit.Assume.assumeTrue;
import static org.mockito.ArgumentMatchers.argThat;
import static org.mockito.Mockito.atLeastOnce;
import org.openqa.selenium.remote.http.HttpHandler;
import org.openqa.selenium.remote.http.HttpRequest;
import org.openqa.selenium.remote.http.HttpResponse;
-import org.openqa.selenium.testing.Ignore;
import io.opentelemetry.OpenTelemetry;
import io.opentelemetry.trace.Tracer;
@@ -72,8 +72,10 @@ public void setUp() throws URISyntaxException {
}
@Test
- @Ignore(travis = true, reason = "We don't have driver servers in PATH when we run unit tests")
public void canConfigureNodeWithDriverDetection() {
+ assumeFalse("We don't have driver servers in PATH when we run unit tests",
+ Boolean.getBoolean("TRAVIS"));
+
Config config = new MapConfig(ImmutableMap.of(
"node", ImmutableMap.of("detect-drivers", "true")));
new NodeOptions(config).configure(tracer, clientFactory, builderSpy);
@@ -90,9 +92,10 @@ public void canConfigureNodeWithDriverDetection() {
}
@Test
- @Ignore(travis = true, reason = "We don't have driver servers in PATH when we run unit tests")
public void shouldDetectCorrectDriversOnWindows() {
assumeTrue(Platform.getCurrent().is(Platform.WINDOWS));
+ assumeFalse("We don't have driver servers in PATH when we run unit tests",
+ Boolean.getBoolean("TRAVIS"));
Config config = new MapConfig(ImmutableMap.of(
"node", ImmutableMap.of("detect-drivers", "true")));
@@ -107,9 +110,10 @@ public void shouldDetectCorrectDriversOnWindows() {
}
@Test
- @Ignore(travis = true, reason = "We don't have driver servers in PATH when we run unit tests")
public void shouldDetectCorrectDriversOnMac() {
assumeTrue(Platform.getCurrent().is(Platform.MAC));
+ assumeFalse("We don't have driver servers in PATH when we run unit tests",
+ Boolean.getBoolean("TRAVIS"));
Config config = new MapConfig(ImmutableMap.of(
"node", ImmutableMap.of("detect-drivers", "true")));
