problem: Kotlin class mocking randomly fails

solution: upgrade testing libs, and open the class
This commit is contained in:
Igor Artamonov
2020-04-20 21:42:53 -04:00
parent 4f0b32f705
commit 322d9ac480
4 changed files with 4 additions and 13 deletions

View File

@@ -10,7 +10,7 @@ import reactor.netty.http.client.HttpClient
import java.util.*
import java.util.function.Consumer
class BitcoinRpcClient(
open class BitcoinRpcClient(
private val target: String,
basicAuth: AuthConfig.ClientBasicAuth?
) {

View File

@@ -1,22 +1,14 @@
package io.emeraldpay.dshackle.upstream.bitcoin
import de.jodamob.kotlin.testrunner.OpenedClasses
import de.jodamob.kotlin.testrunner.SpotlinTestRunner
import io.emeraldpay.dshackle.test.TestingCommons
import org.junit.runner.RunWith
import org.mockserver.integration.ClientAndServer
import reactor.core.publisher.Mono
import reactor.test.StepVerifier
import spock.lang.Specification
import java.time.Duration
@RunWith(SpotlinTestRunner)
@OpenedClasses(BitcoinApi)
class BitcoinRpcHeadSpec extends Specification {
ClientAndServer mockServer
def "Follow 2 blocks created over 3 requests"() {
setup:
String hash1 = "0000000000000000000cf5a5d4dfc4347c0c1a863ec5fdb429b02b2162e50001"