Get rid of useless (Hwvtep)SouthboundProvider thread 66/86166/9
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 3 Dec 2019 20:36:44 +0000 (21:36 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 5 Dec 2019 22:32:37 +0000 (23:32 +0100)
commitfc7b41b68a2fb132dc95e3f7688bcf74e647acd4
tree77e98e9c9e2f520474df9bc9e449b5decec08926
parent64aeaec5e3d0d701dec14a07c8517ff0397b152a
Get rid of useless (Hwvtep)SouthboundProvider thread

The thread instantiated here is useless and the comment is misleading:
ListenerRegistration.close() is specified to be safe in any context
and idempotent. Just get rid of the thread and close the registration
immediately.

This flushes out an immediate problem, where the test would deadlock
due to base test using directExecutor() for DTCLs -- i.e. simulating
execution which does not happen in production. To deal with that we
switch the test to use asynchronous DTCLs and add a simple synchronization
loop to wait for DTCL to trigger.

JIRA: OVSDB-454
Change-Id: I2e86acb9eb30529fcd5d5675005d6c81bd804ba5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepSouthboundProvider.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/SouthboundProvider.java
southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/SouthboundProviderTest.java