Skip to content

Commit b733f96

Browse files
test: fix test with ping-pong latency
Randomly receiving a latency of 0 ms would make the test fail.
1 parent 567372e commit b733f96

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/java/io/socket/client/SocketTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import static org.hamcrest.CoreMatchers.is;
1818
import static org.hamcrest.CoreMatchers.not;
19-
import static org.hamcrest.Matchers.greaterThan;
19+
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
2020
import static org.junit.Assert.assertThat;
2121

2222
@RunWith(JUnit4.class)
@@ -144,7 +144,7 @@ public void call(Object... args) {
144144

145145
@SuppressWarnings("unchecked")
146146
long ms = (long)values.take();
147-
assertThat(ms, greaterThan((long)0));
147+
assertThat(ms, greaterThanOrEqualTo(0L));
148148

149149
socket.disconnect();
150150
}

0 commit comments

Comments
 (0)