… still trying to write another protocol. Can someone point me to where I can/should access the ProtocolConfiguration. How?
thx,
Yo
… still trying to write another protocol. Can someone point me to where I can/should access the ProtocolConfiguration. How?
thx,
Yo
Yep: the ProtocolConfigurationRegistry is passed in ActionBuilder.build.
Can you fill me in on how I get from the ProtocolConfigurationRegistry to the protocol-specific ProtocolConfiguration?
protocolConfigurationRegistry.get[MyProtocolConfiguration] or protocolConfigurationRegistry.get(default: MyProtocolConfiguration)
Or course, MyProtocolConfiguration instance must have been registered first. You usually do so by passing it to protocolConfig on simulation setUp.
Clear?
Got it working now, but might you mean
protocolConfigurationRegistry.getProtocolConfiguration[MyProtocolConfiguration] or protocolConfigurationRegistry.getProtocolConfiguration(default: MyProtocolConfiguration)
?
thx,
Yo
Still don’t understand how in the HTTP case
class HttpRequestActionBuilder(requestName: Expression[String], requestFactory: RequestFactory, checks: List[HttpCheck], responseProcessor: Option[ResponseProcessor]) extends ActionBuilder {
private[gatling] def build(next: ActorRef, protocolConfigurationRegistry: ProtocolConfigurationRegistry): ActorRef = system.actorOf(Props(HttpRequestAction(requestName, next, requestFactory, checks, responseProcessor, protocolConfigurationRegistry)))
}
can work, considering that
class HttpRequestAction(
requestName: Expression[String],
val next: ActorRef,
requestFactory: RequestFactory,
checks: List[HttpCheck],
responseProcessor: Option[ResponseProcessor],
protocolConfiguration: HttpProtocolConfiguration) extends Bypassable {
…
Sure, it can’t
See https://github.com/excilys/gatling/commit/cce31fd7bd5bfb726d31ae013205688700136d31
You’re comparing HttpRequestActionBuilder before this commit and HttpRequestAction after this commit. Our discussion made me realize that the code wasn’t at the right place.