problem: starts subscription on init, may keep them forever

This commit is contained in:
Igor Artamonov
2019-08-13 22:28:26 -04:00
parent 62ec04f151
commit 0b156d12e7
9 changed files with 118 additions and 40 deletions

View File

@@ -56,7 +56,7 @@ class GrpcUpstreamSpec extends Specification {
def upstream = new GrpcUpstream(chain, client, objectMapper, ethereumTargets)
upstream.setLag(0)
when:
upstream.connect()
upstream.start()
def h = upstream.head.head.block(Duration.ofSeconds(1))
then:
callData.chain == Chain.ETHEREUM.id
@@ -112,7 +112,7 @@ class GrpcUpstreamSpec extends Specification {
def upstream = new GrpcUpstream(chain, client, objectMapper, ethereumTargets)
upstream.setLag(0)
when:
upstream.connect()
upstream.start()
finished.get()
def h = upstream.head.head.block(Duration.ofSeconds(1))
then:
@@ -169,7 +169,7 @@ class GrpcUpstreamSpec extends Specification {
def upstream = new GrpcUpstream(chain, client, objectMapper, ethereumTargets)
upstream.setLag(0)
when:
upstream.connect()
upstream.start()
finished.get()
def h = upstream.head.head.block(Duration.ofSeconds(1))
then: