Skip to content

Commit

Permalink
flaky test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
szysas committed Feb 17, 2022
1 parent 2428702 commit f074b5a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions coap-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ dependencies {
testImplementation 'org.assertj:assertj-core:3.22.0'
testImplementation 'nl.jqno.equalsverifier:equalsverifier:3.9'
testImplementation 'org.awaitility:awaitility:4.1.1'
testImplementation 'io.github.artsok:rerunner-jupiter:2.1.6'
}
3 changes: 2 additions & 1 deletion coap-core/src/test/java/protocolTests/ClientServerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import com.mbed.coap.transport.InMemoryCoapTransport;
import com.mbed.coap.transport.TransportContext;
import com.mbed.coap.utils.ReadOnlyCoapResource;
import io.github.artsok.RepeatedIfExceptionsTest;
import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
Expand Down Expand Up @@ -194,7 +195,7 @@ public void simpleIPv6Request() throws CoapException, IOException {
ipv6Server.stop();
}

@Test
@RepeatedIfExceptionsTest(repeats = 3)
public void duplicateTest() throws Exception {
DatagramSocket datagramSocket = new DatagramSocket();
datagramSocket.setSoTimeout(3000);
Expand Down

0 comments on commit f074b5a

Please sign in to comment.