problem: sporadic unit-test failure
This commit is contained in:
@@ -113,6 +113,6 @@ class TrackEthereumAddressSpec extends Specification {
|
|||||||
}
|
}
|
||||||
.expectNext(exp2).as("Second block")
|
.expectNext(exp2).as("Second block")
|
||||||
.thenCancel()
|
.thenCancel()
|
||||||
.verify(Duration.ofSeconds(1))
|
.verify(Duration.ofSeconds(2))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ class EthereumHeadMock implements Head {
|
|||||||
|
|
||||||
void nextBlock(BlockContainer block) {
|
void nextBlock(BlockContainer block) {
|
||||||
assert block != null
|
assert block != null
|
||||||
|
println("New block: ${block.height} / ${block.hash}")
|
||||||
latest = block
|
latest = block
|
||||||
bus.onNext(block)
|
bus.onNext(block)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ class EthereumUpstreamMock extends EthereumUpstream {
|
|||||||
methods, TestingCommons.objectMapper())
|
methods, TestingCommons.objectMapper())
|
||||||
setLag(0)
|
setLag(0)
|
||||||
setStatus(UpstreamAvailability.OK)
|
setStatus(UpstreamAvailability.OK)
|
||||||
|
start()
|
||||||
}
|
}
|
||||||
|
|
||||||
void nextBlock(BlockContainer block) {
|
void nextBlock(BlockContainer block) {
|
||||||
|
|||||||
@@ -76,7 +76,9 @@ class TestingCommons {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static Multistream aggregatedUpstream(EthereumUpstream up) {
|
static Multistream aggregatedUpstream(EthereumUpstream up) {
|
||||||
return new EthereumMultistream(Chain.ETHEREUM, [up], Caches.default(objectMapper()), objectMapper())
|
return new EthereumMultistream(Chain.ETHEREUM, [up], Caches.default(objectMapper()), objectMapper()).tap {
|
||||||
|
start()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static CachesFactory emptyCaches() {
|
static CachesFactory emptyCaches() {
|
||||||
|
|||||||
Reference in New Issue
Block a user