Skip to content

Commit 38b9154

Browse files
committed
Revert prev commit commenting out timeout test.
1 parent 6a0899f commit 38b9154

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

utils/socket-utils/src/test/java/datadog/common/socket/TunnelingJdkSocketTest.java

+11-10
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import java.nio.channels.SocketChannel;
99
import java.nio.file.Files;
1010
import java.nio.file.Path;
11+
import java.time.Duration;
1112
import java.util.concurrent.atomic.AtomicBoolean;
1213
import org.junit.jupiter.api.Test;
1314

@@ -19,16 +20,16 @@ public class TunnelingJdkSocketTest {
1920

2021
@Test
2122
public void testTimeout() throws Exception {
22-
// Path socketPath = getSocketPath();
23-
// UnixDomainSocketAddress socketAddress = UnixDomainSocketAddress.of(socketPath);
24-
// startServer(socketAddress);
25-
// TunnelingJdkSocket clientSocket = createClient(socketPath);
26-
//
27-
// assertTimeoutPreemptively(
28-
// Duration.ofMillis(testTimeout), () -> clientSocket.getInputStream().read());
29-
//
30-
// clientSocket.close();
31-
// isServerRunning.set(false);
23+
Path socketPath = getSocketPath();
24+
UnixDomainSocketAddress socketAddress = UnixDomainSocketAddress.of(socketPath);
25+
startServer(socketAddress);
26+
TunnelingJdkSocket clientSocket = createClient(socketPath);
27+
28+
assertTimeoutPreemptively(
29+
Duration.ofMillis(testTimeout), () -> clientSocket.getInputStream().read());
30+
31+
clientSocket.close();
32+
isServerRunning.set(false);
3233
}
3334

3435
private Path getSocketPath() throws IOException {

0 commit comments

Comments
 (0)