Updates for buffer management in RSocket
- Integration tests run with zero copy configuration. - RSocketBufferLeakTests has been added. - Updates in MessagingRSocket to ensure proper release See gh-21987
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -105,13 +105,15 @@ public abstract class AbstractDataBufferAllocatingTestCase {
|
||||
*/
|
||||
protected void waitForDataBufferRelease(Duration duration) throws InterruptedException {
|
||||
Instant start = Instant.now();
|
||||
while (Instant.now().isBefore(start.plus(duration))) {
|
||||
while (true) {
|
||||
try {
|
||||
verifyAllocations();
|
||||
break;
|
||||
}
|
||||
catch (AssertionError ex) {
|
||||
// ignore;
|
||||
if (Instant.now().isAfter(start.plus(duration))) {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
Thread.sleep(50);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user