MockTransportService.doClose assertions should check openConnections under lock
This commit is contained in:
parent
5f9dfe3186
commit
f387848f83
|
@ -64,7 +64,6 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.Queue;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.concurrent.LinkedBlockingDeque;
|
||||
|
@ -743,6 +742,8 @@ public final class MockTransportService extends TransportService {
|
|||
@Override
|
||||
protected void doClose() {
|
||||
super.doClose();
|
||||
synchronized (openConnections) {
|
||||
assert openConnections.size() == 0 : "still open connections: " + openConnections;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue