[
https://issues.apache.org/jira/browse/ARTEMIS-4464?focusedWorklogId=886926&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-886926
]
ASF GitHub Bot logged work on ARTEMIS-4464:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 24/Oct/23 10:30
Start Date: 24/Oct/23 10:30
Worklog Time Spent: 10m
Work Description: gemmellr commented on code in PR #4652:
URL: https://github.com/apache/activemq-artemis/pull/4652#discussion_r1369819142
##########
tests/artemis-test-support/src/main/java/org/apache/activemq/artemis/utils/RealServerTestBase.java:
##########
@@ -93,6 +93,11 @@ public static String getServerLocation(String serverName) {
return basedir + "/target/" + serverName;
}
+ public static File getFileServerLocation(String serverName) {
+ return new File(getServerLocation(serverName));
+ }
+
+
Review Comment:
superfluous newline
##########
artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/SimpleManagement.java:
##########
@@ -98,6 +98,11 @@ public long getMessageCountOnQueue(String queueName) throws
Exception {
return simpleManagementLong(ResourceNames.QUEUE + queueName,
"getMessageCount");
}
+ public long getMessagesAddedOnQueue(String queueName) throws Exception {
+ return simpleManagementLong(ResourceNames.QUEUE + queueName,
"getMessagesAdded");
+ }
+
+
Review Comment:
superfluous newline
##########
tests/artemis-test-support/src/main/java/org/apache/activemq/artemis/utils/cliHelper/BaseCLI.java:
##########
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.activemq.artemis.utils.cliHelper;
+
+import java.io.File;
+import java.lang.invoke.MethodHandles;
+
+import org.junit.Assert;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class BaseCLI {
+
+ private static final Logger logger =
LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
+ BaseCLI() {
+ String propertyHome = System.getProperty("artemis.distribution.output");
+ if (propertyHome != null) {
+ artemisHome = new File(propertyHome);
+ }
+ logger.debug("using artemisHome as {}", artemisHome);
+ Assert.assertNotNull(artemisHome);
Review Comment:
Would be clearer to assert earlier before logging it. Could move to right
after property retrieval that would be null originally and then also drop the
null check.
##########
tests/artemis-test-support/src/main/java/org/apache/activemq/artemis/utils/cliHelper/BaseCLI.java:
##########
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.activemq.artemis.utils.cliHelper;
+
+import java.io.File;
+import java.lang.invoke.MethodHandles;
+
+import org.junit.Assert;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class BaseCLI {
+
+ private static final Logger logger =
LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
+ BaseCLI() {
+ String propertyHome = System.getProperty("artemis.distribution.output");
+ if (propertyHome != null) {
+ artemisHome = new File(propertyHome);
+ }
+ logger.debug("using artemisHome as {}", artemisHome);
+ Assert.assertNotNull(artemisHome);
+ Assert.assertTrue(artemisHome.exists());
+ Assert.assertTrue(new File(artemisHome, "/bin").exists());
+ Assert.assertTrue(new File(artemisHome, "/bin/artemis").exists());
+
Review Comment:
Superfluous newline.
##########
tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/replicationflow/ReplicationFlowControlTest.java:
##########
@@ -45,6 +47,63 @@ public class ReplicationFlowControlTest extends SoakTestBase
{
public static final String SERVER_NAME_0 = "replicated-static0";
public static final String SERVER_NAME_1 = "replicated-static1";
+ /*
+ <execution>
+ <phase>test-compile</phase>
+ <id>created-static0</id>
+ <goals>
+ <goal>create</goal>
+ </goals>
+ <configuration>
+ <!
Issue Time Tracking
-------------------
Worklog Id: (was: 886926)
Time Spent: 20m (was: 10m)
> Cleanup on Soak and Smoke Tests
> -------------------------------
>
> Key: ARTEMIS-4464
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4464
> Project: ActiveMQ Artemis
> Issue Type: Task
> Reporter: Clebert Suconic
> Priority: Major
> Time Spent: 20m
> Remaining Estimate: 0h
>
> I did the following cleanup:
> - removed a few not used / ignored tests (DNSSwitchTest is not in use by any
> CI I know any more and it's now vaporware)
> - A lot of tests (too many) were using the maven CLi. I'm now calling the CLI
> from the test
> Keeping only a few that is either using a maven property or downloading jars.
> - removed a few JMX usages and replaced by SimpleManagement (over messaging)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)