Fix intermittent ConfigPersisterTest failure 39/21139/2
authorTom Pantelis <tpanteli@brocade.com>
Fri, 15 May 2015 17:21:13 +0000 (13:21 -0400)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 27 May 2015 02:43:00 +0000 (02:43 +0000)
testSuccessConflictingVersionException fails intermittently on Jenkins
with different errors. I think the problem is that it sets up the
"workingService" which the ConfigPusher is accessing createService on
another thread. In reading Mockito FAQs, you may get strange intermittent
results with multi-threading wrt to stubbing. Mocks can be accessed from
multiple threads but it's recommended that you setup all the stubbed
methods ahead of time. So I changed
testSuccessConflictingVersionException to do so.

After the fix, I ran the ConfigPersisterTest 550 times w/o failure.

Change-Id: Ia22936cfad82416e317935bd40b0eb3ccbdb232c
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
(cherry picked from commit e60d699bfe040f3ce570b4e634b0612eadeaca45)


No differences found