Skip to content

Commit e529cf1

Browse files
committed
Skip failing socket options test for windows
1 parent 415e913 commit e529cf1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

okhttp/src/test/java/io/grpc/okhttp/UtilsTest.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import io.grpc.okhttp.internal.TlsVersion;
2626
import java.net.Socket;
2727
import java.util.List;
28+
import java.util.Locale;
2829
import org.junit.Rule;
2930
import org.junit.Test;
3031
import org.junit.rules.ExpectedException;
@@ -95,6 +96,9 @@ public void getSocketOptions() throws Exception {
9596
assertEquals("5000", socketOptions.others.get("SO_SNDBUF"));
9697
assertEquals("true", socketOptions.others.get("SO_KEEPALIVE"));
9798
assertEquals("true", socketOptions.others.get("SO_OOBINLINE"));
98-
assertEquals("8", socketOptions.others.get("IP_TOS"));
99+
String osName = System.getProperty("os.name").toLowerCase(Locale.ENGLISH);
100+
if (!osName.startsWith("windows")) {
101+
assertEquals("8", socketOptions.others.get("IP_TOS"));
102+
}
99103
}
100104
}

0 commit comments

Comments
 (0)