Reanimate grpc upstreams (#491)

This commit is contained in:
KirillPamPam
2024-05-30 14:03:53 +04:00
committed by GitHub
parent f3ab6b3443
commit 71d68e858b
18 changed files with 237 additions and 60 deletions

View File

@@ -60,7 +60,7 @@ class GrpcHeadSpec extends Specification {
}
})
def convert = { BlockchainOuterClass.ChainHead head ->
TestingCommons.blockForBitcoin(head.height)
new GrpcHead.GrpcHeadData(TestingCommons.blockForBitcoin(head.height), List.of())
}
def head = new GrpcHead(
"test",
@@ -127,7 +127,7 @@ class GrpcHeadSpec extends Specification {
}
})
def convert = { BlockchainOuterClass.ChainHead head ->
TestingCommons.blockForBitcoin(head.height)
new GrpcHead.GrpcHeadData(TestingCommons.blockForBitcoin(head.height), List.of())
}
def head = new GrpcHead(
"test",

View File

@@ -2,6 +2,7 @@ package io.emeraldpay.dshackle.startup.configure
import io.emeraldpay.dshackle.BlockchainType
import io.emeraldpay.dshackle.config.UpstreamsConfig
import io.emeraldpay.dshackle.upstream.grpc.GrpcUpstreamCreator
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.params.ParameterizedTest
import org.junit.jupiter.params.provider.Arguments
@@ -33,7 +34,13 @@ class UpstreamFactoryTest {
private val genericUpstreamCreator = mock<GenericUpstreamCreator>()
private val ethereumUpstreamCreator = mock<EthereumUpstreamCreator>()
private val bitcoinUpstreamCreator = mock<BitcoinUpstreamCreator>()
private val upstreamFactory = UpstreamFactory(genericUpstreamCreator, ethereumUpstreamCreator, bitcoinUpstreamCreator)
private val grpcUpstreamCreator = mock<GrpcUpstreamCreator>()
private val upstreamFactory = UpstreamFactory(
genericUpstreamCreator,
ethereumUpstreamCreator,
bitcoinUpstreamCreator,
grpcUpstreamCreator,
)
@JvmStatic
fun data() = listOf(