This commit is contained in:
Captain.B 2020-03-25 17:14:31 +08:00
parent d9a6cacc0f
commit 564bab0097
1 changed files with 3 additions and 3 deletions

View File

@ -47,14 +47,14 @@ public class KubernetesTestEngine extends AbstractEngine {
} }
try { try {
EngineContext context = EngineFactory.createContext(loadTest, threadNum); EngineContext context = EngineFactory.createContext(loadTest, threadNum);
runTest(context, clientCredential, 1); runTest(context, clientCredential);
} catch (Exception e) { } catch (Exception e) {
MSException.throwException(e); MSException.throwException(e);
} }
}); });
} }
private void runTest(EngineContext context, ClientCredential credential, int replicas) { private void runTest(EngineContext context, ClientCredential credential) {
KubernetesProvider kubernetesProvider = new KubernetesProvider(JSON.toJSONString(credential)); KubernetesProvider kubernetesProvider = new KubernetesProvider(JSON.toJSONString(credential));
// create namespace // create namespace
@ -88,7 +88,7 @@ public class KubernetesTestEngine extends AbstractEngine {
setName(context.getTestId()); setName(context.getTestId());
}}); }});
jmeter.setSpec(new JmeterSpec() {{ jmeter.setSpec(new JmeterSpec() {{
setReplicas(replicas); setReplicas(1);
setImage(registryService.getRegistry() + "jmeter-master:0.0.2"); setImage(registryService.getRegistry() + "jmeter-master:0.0.2");
}}); }});
LogUtil.info("Load test started. " + context.getTestId()); LogUtil.info("Load test started. " + context.getTestId());