BUG-8618: fix test driver 37/60137/8
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 10 Jul 2017 14:08:57 +0000 (16:08 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Sat, 15 Jul 2017 01:35:30 +0000 (03:35 +0200)
commit2be77b3bcef31ad8b6dbdce073471561d2cf76d6
tree6c1c067c9cb76a68781334e4bb5181b41e421f32
parent40d27d44d6f0b0358505b2e8ac5abbad25f47d4b
BUG-8618: fix test driver

Since the test can produce bursts of completions, which in turn can
get slowed down by writout of new messages, offload future completion
to the executor we have internally. This in turn simplifies things,
as we can rely on state being manipulated (mostly) from a single thread.

Also change ArrayDeque to a HashSet to ensure removal of tasks completes
quickly even in face of misordered responses.

Change-Id: Ia5341633af2dbe3e26e7208436405daf7632a876
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/impl/AbstractTransactionHandler.java
opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/impl/FinalizableScheduledExecutorService.java [new file with mode: 0644]
opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/impl/FlappingSingletonService.java