1
0
mirror of https://github.com/square/okhttp.git synced 2025-11-24 18:41:06 +03:00

Add a windows executor to the build (#5769)

* Add a windows executor to the build

* Disable failing tests on windows

* Workaround find limitations
This commit is contained in:
Liam Newman
2020-02-05 18:09:37 -08:00
committed by GitHub
parent c2481103fd
commit 78016071b3
9 changed files with 101 additions and 0 deletions

View File

@@ -23,6 +23,7 @@ import java.util.Arrays;
import java.util.List;
import okhttp3.internal.http2.Header;
import static org.junit.Assume.assumeFalse;
import static org.junit.Assume.assumeNoException;
public final class TestUtil {
@@ -64,4 +65,17 @@ public final class TestUtil {
assumeNoException(uhe);
}
}
public static void assumeNotWindows() {
boolean isWindows = false;
try {
String osName = System.getProperty("os.name");
isWindows = osName.startsWith("Windows");
} catch (final Exception ex) {
// Any exception means this is not a Windows system
// or we do not have permissions to check
}
assumeFalse("This test fails on Windows.", isWindows);
}
}