From ef4cfa11091174ee0a9615c349bd9c3ae969a541 Mon Sep 17 00:00:00 2001 From: Ondrej Kotek Date: Tue, 12 Sep 2023 16:20:33 +0200 Subject: [PATCH] HAL-1888: Fix test issues in manatoko modcluster tests --- .../modcluster/CustomLoadMetricTest.java | 12 +++++++----- .../configuration/modcluster/LoadMetricTest.java | 10 +++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/test-configuration-modcluster/src/test/java/org/jboss/hal/testsuite/test/configuration/modcluster/CustomLoadMetricTest.java b/test-configuration-modcluster/src/test/java/org/jboss/hal/testsuite/test/configuration/modcluster/CustomLoadMetricTest.java index 5c8da3a6..ce0e7b52 100644 --- a/test-configuration-modcluster/src/test/java/org/jboss/hal/testsuite/test/configuration/modcluster/CustomLoadMetricTest.java +++ b/test-configuration-modcluster/src/test/java/org/jboss/hal/testsuite/test/configuration/modcluster/CustomLoadMetricTest.java @@ -36,8 +36,8 @@ import org.wildfly.extras.creaper.core.online.operations.Values; import static org.jboss.hal.dmr.ModelDescriptionConstants.CLASS; -import static org.jboss.hal.dmr.ModelDescriptionConstants.CONNECTOR; import static org.jboss.hal.dmr.ModelDescriptionConstants.DEFAULT; +import static org.jboss.hal.dmr.ModelDescriptionConstants.LISTENER; import static org.jboss.hal.dmr.ModelDescriptionConstants.NAME; import static org.jboss.hal.testsuite.container.WildFlyConfiguration.HA; import static org.jboss.hal.testsuite.fixtures.ModclusterFixtures.CLASS_NAME; @@ -61,11 +61,13 @@ static void setupModel() throws Exception { OnlineManagementClient client = wildFly.managementClient(); Operations operations = new Operations(client); Batch proxyAdd = new Batch(); - proxyAdd.add(proxyAddress(PROXY_UPDATE), Values.of(CONNECTOR, DEFAULT)); + proxyAdd.add(proxyAddress(PROXY_UPDATE), Values.of(LISTENER, DEFAULT)); proxyAdd.add(loadProviderDynamicAddress(PROXY_UPDATE)); - operations.batch(proxyAdd); - operations.add(customLoadMetricAddress(PROXY_UPDATE, CUSTOM_LOAD_METRIC_DELETE), Values.of(CLASS, CLASS_NAME)); - operations.add(customLoadMetricAddress(PROXY_UPDATE, CUSTOM_LOAD_METRIC_UPDATE), Values.of(CLASS, CLASS_NAME)); + operations.batch(proxyAdd).assertSuccess(); + operations.add(customLoadMetricAddress(PROXY_UPDATE, CUSTOM_LOAD_METRIC_DELETE), Values.of(CLASS, CLASS_NAME)) + .assertSuccess(); + operations.add(customLoadMetricAddress(PROXY_UPDATE, CUSTOM_LOAD_METRIC_UPDATE), Values.of(CLASS, CLASS_NAME)) + .assertSuccess(); } @Inject Console console; diff --git a/test-configuration-modcluster/src/test/java/org/jboss/hal/testsuite/test/configuration/modcluster/LoadMetricTest.java b/test-configuration-modcluster/src/test/java/org/jboss/hal/testsuite/test/configuration/modcluster/LoadMetricTest.java index 43de619f..44fa6758 100644 --- a/test-configuration-modcluster/src/test/java/org/jboss/hal/testsuite/test/configuration/modcluster/LoadMetricTest.java +++ b/test-configuration-modcluster/src/test/java/org/jboss/hal/testsuite/test/configuration/modcluster/LoadMetricTest.java @@ -35,8 +35,8 @@ import org.wildfly.extras.creaper.core.online.operations.Operations; import org.wildfly.extras.creaper.core.online.operations.Values; -import static org.jboss.hal.dmr.ModelDescriptionConstants.CONNECTOR; import static org.jboss.hal.dmr.ModelDescriptionConstants.DEFAULT; +import static org.jboss.hal.dmr.ModelDescriptionConstants.LISTENER; import static org.jboss.hal.dmr.ModelDescriptionConstants.NAME; import static org.jboss.hal.dmr.ModelDescriptionConstants.TYPE; import static org.jboss.hal.testsuite.container.WildFlyConfiguration.HA; @@ -61,11 +61,11 @@ static void setupModel() throws Exception { OnlineManagementClient client = wildFly.managementClient(); Operations operations = new Operations(client); Batch proxyAdd = new Batch(); - proxyAdd.add(proxyAddress(PROXY_UPDATE), Values.of(CONNECTOR, DEFAULT)); + proxyAdd.add(proxyAddress(PROXY_UPDATE), Values.of(LISTENER, DEFAULT)); proxyAdd.add(loadProviderDynamicAddress(PROXY_UPDATE)); - operations.batch(proxyAdd); - operations.add(loadMetricAddress(PROXY_UPDATE, LOAD_METRIC_DELETE), Values.of(TYPE, "mem")); - operations.add(loadMetricAddress(PROXY_UPDATE, LOAD_METRIC_UPDATE), Values.of(TYPE, "mem")); + operations.batch(proxyAdd).assertSuccess(); + operations.add(loadMetricAddress(PROXY_UPDATE, LOAD_METRIC_DELETE), Values.of(TYPE, "heap")).assertSuccess(); + operations.add(loadMetricAddress(PROXY_UPDATE, LOAD_METRIC_UPDATE), Values.of(TYPE, "heap")).assertSuccess(); } @Inject Console console;