Skip to content

Commit 4c6f34e

Browse files
committed
Breaking a circular build dependency in test code
1 parent 6b58d26 commit 4c6f34e

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

java/client/test/org/openqa/selenium/testing/drivers/TestIgnorance.java

+9-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
import org.openqa.selenium.testing.JavascriptEnabled;
4949
import org.openqa.selenium.testing.NativeEventsRequired;
5050
import org.openqa.selenium.testing.NeedsLocalEnvironment;
51-
import org.openqa.selenium.testing.TestUtilities;
5251

5352
import java.util.Arrays;
5453
import java.util.Set;
@@ -132,10 +131,18 @@ private boolean isIgnoredBecauseOfNativeEvents(NativeEventsRequired annotation)
132131
}
133132

134133
// We only have native events on Linux and Windows.
135-
Platform platform = TestUtilities.getEffectivePlatform();
134+
Platform platform = getEffectivePlatform();
136135
return !(platform.is(LINUX) || platform.is(WINDOWS));
137136
}
138137

138+
private static Platform getEffectivePlatform() {
139+
if (SauceDriver.shouldUseSauce()) {
140+
return SauceDriver.getEffectivePlatform();
141+
}
142+
143+
return Platform.getCurrent();
144+
}
145+
139146
private boolean isIgnoredDueToBeingOnSauce(FrameworkMethod method, Object test) {
140147
return SauceDriver.shouldUseSauce() &&
141148
(method.getMethod().getAnnotation(NeedsLocalEnvironment.class) != null ||

0 commit comments

Comments
 (0)