fix: 修复k8s执行性能测试时构造方法参数错误的问题

This commit is contained in:
CaptainB 2022-10-12 16:44:05 +08:00 committed by 刘瑞斌
parent adff8203bd
commit 285501d0a9
1 changed files with 2 additions and 2 deletions

View File

@ -88,7 +88,7 @@ public class KubernetesTestEngine extends AbstractEngine {
ClientCredential clientCredential = JSON.parseObject(resource.getConfiguration(), ClientCredential.class); ClientCredential clientCredential = JSON.parseObject(resource.getConfiguration(), ClientCredential.class);
try { try {
KubernetesProvider kubernetesProvider = ConstructorUtils.invokeConstructor(providerClass, loadTestReport); KubernetesProvider kubernetesProvider = ConstructorUtils.invokeConstructor(providerClass, clientCredential);
kubernetesProvider.deployJmeter(request, clientCredential); kubernetesProvider.deployJmeter(request, clientCredential);
} catch (Exception e) { } catch (Exception e) {
LogUtil.error(e); LogUtil.error(e);
@ -102,7 +102,7 @@ public class KubernetesTestEngine extends AbstractEngine {
resourceList.forEach(r -> { resourceList.forEach(r -> {
ClientCredential clientCredential = JSON.parseObject(r.getConfiguration(), ClientCredential.class); ClientCredential clientCredential = JSON.parseObject(r.getConfiguration(), ClientCredential.class);
try { try {
KubernetesProvider kubernetesProvider = ConstructorUtils.invokeConstructor(providerClass, loadTestReport); KubernetesProvider kubernetesProvider = ConstructorUtils.invokeConstructor(providerClass, clientCredential);
kubernetesProvider.deleteJmeter(testId, clientCredential.getNamespace()); kubernetesProvider.deleteJmeter(testId, clientCredential.getNamespace());
} catch (Exception e) { } catch (Exception e) {
LogUtil.error(e); LogUtil.error(e);