Add logs and tracer span for logsoracle (#392)
This commit is contained in:
@@ -52,7 +52,8 @@ class MultistreamHolderMock implements MultistreamHolder {
|
||||
EthereumChainSpecific.INSTANCE.makeCachingReaderBuilder(TestingCommons.tracerMock()),
|
||||
EthereumChainSpecific.INSTANCE.&localReaderBuilder,
|
||||
io.emeraldpay.dshackle.upstream.starknet.StarknetChainSpecific.INSTANCE.subscriptionBuilder(Schedulers.boundedElastic()),
|
||||
null, Schedulers.immediate()
|
||||
null, Schedulers.immediate(),
|
||||
TestingCommons.tracerMock()
|
||||
)
|
||||
upstreams[chain].addUpstream(up)
|
||||
} else {
|
||||
@@ -105,7 +106,8 @@ class MultistreamHolderMock implements MultistreamHolder {
|
||||
super(chain, Schedulers.immediate(), null, upstreams, caches, Schedulers.boundedElastic(),
|
||||
EthereumChainSpecific.INSTANCE.makeCachingReaderBuilder(new BraveTracer(null, null, null)),
|
||||
EthereumChainSpecific.INSTANCE.&localReaderBuilder,
|
||||
EthereumChainSpecific.INSTANCE.subscriptionBuilder(Schedulers.boundedElastic()), null, Schedulers.immediate())
|
||||
EthereumChainSpecific.INSTANCE.subscriptionBuilder(Schedulers.boundedElastic()), null, Schedulers.immediate(),
|
||||
new BraveTracer(null, null, null))
|
||||
}
|
||||
|
||||
EthereumMultistreamMock(@NotNull Chain chain, @NotNull List<GenericUpstream> upstreams) {
|
||||
|
||||
@@ -99,7 +99,8 @@ class TestingCommons {
|
||||
EthereumChainSpecific.INSTANCE.&localReaderBuilder,
|
||||
EthereumChainSpecific.INSTANCE.subscriptionBuilder(Schedulers.boundedElastic()),
|
||||
null,
|
||||
Schedulers.immediate()
|
||||
Schedulers.immediate(),
|
||||
tracerMock()
|
||||
).tap {
|
||||
it.processUpstreamsEvents(
|
||||
new UpstreamChangeEvent(Chain.ETHEREUM__MAINNET, up, UpstreamChangeEvent.ChangeType.ADDED)
|
||||
@@ -128,7 +129,8 @@ class TestingCommons {
|
||||
EthereumChainSpecific.INSTANCE.&localReaderBuilder,
|
||||
EthereumChainSpecific.INSTANCE.subscriptionBuilder(Schedulers.boundedElastic()),
|
||||
null,
|
||||
Schedulers.immediate())
|
||||
Schedulers.immediate(),
|
||||
tracerMock())
|
||||
}
|
||||
|
||||
static Multistream multistreamClassicWithoutUpstreams(Chain chain) {
|
||||
@@ -137,7 +139,8 @@ class TestingCommons {
|
||||
EthereumChainSpecific.INSTANCE.&localReaderBuilder,
|
||||
EthereumChainSpecific.INSTANCE.subscriptionBuilder(Schedulers.boundedElastic()),
|
||||
null,
|
||||
Schedulers.immediate())
|
||||
Schedulers.immediate(),
|
||||
tracerMock())
|
||||
}
|
||||
|
||||
static FileResolver fileResolver() {
|
||||
|
||||
@@ -59,7 +59,7 @@ class MultistreamSpec extends Specification {
|
||||
Schedulers.boundedElastic(),
|
||||
EthereumChainSpecific.INSTANCE.makeCachingReaderBuilder(TestingCommons.tracerMock()),
|
||||
EthereumChainSpecific.INSTANCE.&localReaderBuilder,
|
||||
EthereumChainSpecific.INSTANCE.subscriptionBuilder(Schedulers.boundedElastic()), null, Schedulers.immediate())
|
||||
EthereumChainSpecific.INSTANCE.subscriptionBuilder(Schedulers.boundedElastic()), null, Schedulers.immediate(), TestingCommons.tracerMock())
|
||||
when:
|
||||
aggr.onUpstreamsUpdated()
|
||||
def act = aggr.getMethods()
|
||||
@@ -194,7 +194,7 @@ class MultistreamSpec extends Specification {
|
||||
Schedulers.boundedElastic(),
|
||||
EthereumChainSpecific.INSTANCE.makeCachingReaderBuilder(TestingCommons.tracerMock()),
|
||||
EthereumChainSpecific.INSTANCE.&localReaderBuilder,
|
||||
EthereumChainSpecific.INSTANCE.subscriptionBuilder(Schedulers.boundedElastic()), null, Schedulers.immediate())
|
||||
EthereumChainSpecific.INSTANCE.subscriptionBuilder(Schedulers.boundedElastic()), null, Schedulers.immediate(), TestingCommons.tracerMock())
|
||||
|
||||
expect:
|
||||
multistream.getHead(new Selector.LabelMatcher("provider", ["internal"])).is(up1.ethereumHeadMock)
|
||||
@@ -267,7 +267,7 @@ class MultistreamSpec extends Specification {
|
||||
Schedulers.boundedElastic(),
|
||||
EthereumChainSpecific.INSTANCE.makeCachingReaderBuilder(TestingCommons.tracerMock()),
|
||||
EthereumChainSpecific.INSTANCE.&localReaderBuilder,
|
||||
EthereumChainSpecific.INSTANCE.subscriptionBuilder(Schedulers.boundedElastic()), null, Schedulers.immediate())
|
||||
EthereumChainSpecific.INSTANCE.subscriptionBuilder(Schedulers.boundedElastic()), null, Schedulers.immediate(), TestingCommons.tracerMock())
|
||||
when:
|
||||
ms.processUpstreamsEvents(
|
||||
new UpstreamChangeEvent(Chain.ETHEREUM__MAINNET, up1, UpstreamChangeEvent.ChangeType.ADDED)
|
||||
@@ -298,7 +298,7 @@ class MultistreamSpec extends Specification {
|
||||
Schedulers.boundedElastic(),
|
||||
EthereumChainSpecific.INSTANCE.makeCachingReaderBuilder(TestingCommons.tracerMock()),
|
||||
EthereumChainSpecific.INSTANCE.&localReaderBuilder,
|
||||
EthereumChainSpecific.INSTANCE.subscriptionBuilder(Schedulers.boundedElastic()), null, Schedulers.immediate())
|
||||
EthereumChainSpecific.INSTANCE.subscriptionBuilder(Schedulers.boundedElastic()), null, Schedulers.immediate(), TestingCommons.tracerMock())
|
||||
def head1 = createBlock(250, "0x0d050c785de17179f935b9b93aca09c442964cc59972c71ae68e74731448401b")
|
||||
def head2 = createBlock(270, "0x0d050c785de17179f935b9b93aca09c442964cc59972c71ae68e74731448402b")
|
||||
def head3 = createBlock(100, "0x0d050c785de17179f935b9b93aca09c442964cc59972c71ae68e74731448412b")
|
||||
@@ -333,7 +333,7 @@ class MultistreamSpec extends Specification {
|
||||
Schedulers.boundedElastic(),
|
||||
EthereumChainSpecific.INSTANCE.makeCachingReaderBuilder(TestingCommons.tracerMock()),
|
||||
EthereumChainSpecific.INSTANCE.&localReaderBuilder,
|
||||
EthereumChainSpecific.INSTANCE.subscriptionBuilder(Schedulers.boundedElastic()), null, Schedulers.immediate())
|
||||
EthereumChainSpecific.INSTANCE.subscriptionBuilder(Schedulers.boundedElastic()), null, Schedulers.immediate(), TestingCommons.tracerMock())
|
||||
multistream.processUpstreamsEvents(
|
||||
new UpstreamChangeEvent(Chain.ETHEREUM__MAINNET, up1, UpstreamChangeEvent.ChangeType.ADDED)
|
||||
)
|
||||
@@ -371,7 +371,7 @@ class MultistreamSpec extends Specification {
|
||||
Schedulers.boundedElastic(),
|
||||
EthereumChainSpecific.INSTANCE.makeCachingReaderBuilder(TestingCommons.tracerMock()),
|
||||
EthereumChainSpecific.INSTANCE.&localReaderBuilder,
|
||||
StarknetChainSpecific.INSTANCE.subscriptionBuilder(Schedulers.boundedElastic()), null, Schedulers.immediate())
|
||||
StarknetChainSpecific.INSTANCE.subscriptionBuilder(Schedulers.boundedElastic()), null, Schedulers.immediate(), TestingCommons.tracerMock())
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -181,6 +181,7 @@ class ReloadConfigTest {
|
||||
cs.subscriptionBuilder(Schedulers.boundedElastic()),
|
||||
null,
|
||||
Schedulers.fromExecutor(Executors.newFixedThreadPool(6)),
|
||||
mock<Tracer>(),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user