#8188: fix test flakiness by using a thread-safe collection to track leaded buffers

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
This commit is contained in:
Ludovic Orban 2022-06-22 09:34:09 +02:00
parent 7b57307c71
commit 50b7dc4bbc
1 changed files with 3 additions and 6 deletions

View File

@ -826,8 +826,7 @@ public class HttpClientTLSTest
public ByteBuffer acquire(int size, boolean direct)
{
ByteBuffer acquired = super.acquire(size, direct);
if (acquired != null)
leakedBuffers.add(acquired);
leakedBuffers.add(acquired);
return acquired;
}
@ -896,8 +895,7 @@ public class HttpClientTLSTest
public ByteBuffer acquire(int size, boolean direct)
{
ByteBuffer acquired = super.acquire(size, direct);
if (acquired != null)
leakedBuffers.add(acquired);
leakedBuffers.add(acquired);
return acquired;
}
@ -980,8 +978,7 @@ public class HttpClientTLSTest
public ByteBuffer acquire(int size, boolean direct)
{
ByteBuffer acquired = super.acquire(size, direct);
if (acquired != null)
leakedBuffers.add(acquired);
leakedBuffers.add(acquired);
return acquired;
}