test support for blackhole in Artery, #20589
This commit is contained in:
parent
f31c2701a8
commit
ea231b1cbc
7 changed files with 369 additions and 57 deletions
|
|
@ -122,10 +122,17 @@ trait Conductor { this: TestConductorExt ⇒
|
|||
def blackhole(node: RoleName, target: RoleName, direction: Direction): Future[Done] =
|
||||
throttle(node, target, direction, 0f)
|
||||
|
||||
private def requireTestConductorTranport(): Unit =
|
||||
if (!transport.defaultAddress.protocol.contains(".trttl.gremlin."))
|
||||
throw new ConfigurationException("To use this feature you must activate the failure injector adapters " +
|
||||
"(trttl, gremlin) by specifying `testTransport(on = true)` in your MultiNodeConfig.")
|
||||
private def requireTestConductorTranport(): Unit = {
|
||||
if (transport.provider.remoteSettings.EnableArtery) {
|
||||
if (!transport.provider.remoteSettings.TestMode)
|
||||
throw new ConfigurationException("To use this feature you must activate the test mode " +
|
||||
"by specifying `testTransport(on = true)` in your MultiNodeConfig.")
|
||||
} else {
|
||||
if (!transport.defaultAddress.protocol.contains(".trttl.gremlin."))
|
||||
throw new ConfigurationException("To use this feature you must activate the failure injector adapters " +
|
||||
"(trttl, gremlin) by specifying `testTransport(on = true)` in your MultiNodeConfig.")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Switch the Netty pipeline of the remote support into pass through mode for
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@ abstract class MultiNodeConfig {
|
|||
if (_testTransport) ConfigFactory.parseString(
|
||||
"""
|
||||
akka.remote.netty.tcp.applied-adapters = [trttl, gremlin]
|
||||
akka.remote.artery.advanced.test-mode = on
|
||||
""")
|
||||
else ConfigFactory.empty
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue