Skip to content

Commit 4c38848

Browse files
schmelter-sapRealCLanger
authored andcommitted
SapMachine SAP#2028: Spurious failures in FileSocketTransportTest
1 parent b3fc933 commit 4c38848

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/jdk/com/sun/jdi/FileSocketTransportTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, 2024 SAP SE. All rights reserved.
2+
* Copyright (c) 2018, 2025 SAP SE. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -62,6 +62,8 @@ private static int handshake(String path, byte[] handshake, byte[] reply) throws
6262
}
6363
ByteBuffer in = ByteBuffer.wrap(reply);
6464
int result = channel.read(in);
65+
// When we are connected and have received at least one byte, the file should be deleted.
66+
checkSocketDeleted(path);
6567
channel.close();
6668

6769
return result;
@@ -138,7 +140,6 @@ public static void main(String[] args) throws Throwable {
138140
Thread.sleep(3000);
139141
checkSocketPresent(socketName);
140142
read = handshake(socketName, handshake, received);
141-
checkSocketDeleted(socketName);
142143
assertEquals(new String(handshake, "UTF-8"),
143144
new String(received, "UTF-8"));
144145
assertEquals(read, received.length);

0 commit comments

Comments
 (0)