ctx.proceed();
pluginContainerDiscovered.fire(new PluginContainerDiscovered(event.getTestInstance(), event.getTestMethod()));
}
private void lookup(Annotation... qualifiers) {
DeploymentScenario scenario = deploymentScenario.get();
if (scenario == null) {
return;
}
boolean contextActivated = false;
OperateOnDeployment deploymentSpecifier = getOperateOnDeployment(qualifiers);
Deployment specificDeployment = null;
if (deploymentSpecifier != null) {
specificDeployment = scenario.deployment(new DeploymentTargetDescription(deploymentSpecifier.value()));
if (specificDeployment == null) {
throw new IllegalArgumentException("@" + OperateOnDeployment.class.getSimpleName() + " specified an unknown deployment '" + deploymentSpecifier.value());
}
deploymentContext.get().activate(specificDeployment);
contextActivated = true;
}
try {
TargetDescription target = specificDeployment == null ? checkAndGetCommonTarget(scenario.deployments()) : specificDeployment.getDescription().getTarget();
lookupAndSetPluginContainer(target);
} finally {
if (contextActivated) {
deploymentContext.get().deactivate();
}