Fix flaky test (#3363)

This commit is contained in:
Katarzyna Streich 2018-06-14 10:20:18 +01:00 committed by GitHub
parent fea296058a
commit 3d107200a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,8 +71,8 @@ class NetworkMapUpdaterTest {
server.close()
}
private fun setUpdater(ourNodeHash: SecureHash? = null, extraNetworkMapKeys: List<UUID> = emptyList()) {
updater = NetworkMapUpdater(networkMapCache, fileWatcher, networkMapClient, server.networkParameters.serialize().hash, ourNodeHash, baseDir, extraNetworkMapKeys)
private fun setUpdater(ourNodeHash: SecureHash? = null, extraNetworkMapKeys: List<UUID> = emptyList(), netMapClient: NetworkMapClient? = networkMapClient) {
updater = NetworkMapUpdater(networkMapCache, fileWatcher, netMapClient, server.networkParameters.serialize().hash, ourNodeHash, baseDir, extraNetworkMapKeys)
}
@Test
@ -230,7 +230,7 @@ class NetworkMapUpdaterTest {
@Test
fun `remove node from filesystem deletes it from network map cache`() {
setUpdater()
setUpdater(netMapClient = null)
val fileNodeInfoAndSigned1 = createNodeInfoAndSigned("Info from file 1")
val fileNodeInfoAndSigned2 = createNodeInfoAndSigned("Info from file 2")
updater.subscribeToNetworkMap()