Skip to content

Commit 5c1ec41

Browse files
committed
test: common: Actually use different AF_UNIX sockets for newTempAddress
Previously, we were reusing SocketTestBase.socketFile(), which may result in unexpected errors due to race conditions. Create new AF_UNIX temp addresses using AFUNIXSocketAddress.ofNewTempFile() instead.
1 parent c2602d3 commit 5c1ec41

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

junixsocket-common/src/test/java/org/newsclub/net/unix/domain/AFUNIXAddressSpecifics.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ private AFUNIXAddressSpecifics() {
4848

4949
@Override
5050
public AFSocketAddress newTempAddress() throws IOException {
51-
return AFUNIXSocketAddress.of(SocketTestBase.socketFile());
51+
return AFUNIXSocketAddress.ofNewTempFile();
5252
}
5353

5454
@Override

0 commit comments

Comments
 (0)