#8188: fix test flakiness by handling null buffers returned by the pool
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
This commit is contained in:
parent
110896b4d1
commit
7b57307c71
|
@ -826,7 +826,8 @@ public class HttpClientTLSTest
|
|||
public ByteBuffer acquire(int size, boolean direct)
|
||||
{
|
||||
ByteBuffer acquired = super.acquire(size, direct);
|
||||
leakedBuffers.add(acquired);
|
||||
if (acquired != null)
|
||||
leakedBuffers.add(acquired);
|
||||
return acquired;
|
||||
}
|
||||
|
||||
|
@ -895,7 +896,8 @@ public class HttpClientTLSTest
|
|||
public ByteBuffer acquire(int size, boolean direct)
|
||||
{
|
||||
ByteBuffer acquired = super.acquire(size, direct);
|
||||
leakedBuffers.add(acquired);
|
||||
if (acquired != null)
|
||||
leakedBuffers.add(acquired);
|
||||
return acquired;
|
||||
}
|
||||
|
||||
|
@ -978,7 +980,8 @@ public class HttpClientTLSTest
|
|||
public ByteBuffer acquire(int size, boolean direct)
|
||||
{
|
||||
ByteBuffer acquired = super.acquire(size, direct);
|
||||
leakedBuffers.add(acquired);
|
||||
if (acquired != null)
|
||||
leakedBuffers.add(acquired);
|
||||
return acquired;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue