gemmellr commented on code in PR #5390: URL: https://github.com/apache/activemq-artemis/pull/5390#discussion_r1888937842
########## tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/multiprotocol/JMSMessageExpiryTest.java: ########## @@ -0,0 +1,197 @@ +/* + * 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.tests.integration.jms.multiprotocol; + +import javax.jms.Connection; +import javax.jms.Message; +import javax.jms.MessageConsumer; +import javax.jms.MessageProducer; +import javax.jms.Queue; +import javax.jms.Session; +import java.lang.invoke.MethodHandles; + +import org.apache.activemq.artemis.core.settings.impl.AddressSettings; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Timeout; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +public class JMSMessageExpiryTest extends MultiprotocolJMSClientTestSupport { + + protected static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); + + private final long EXPIRY_DELAY = 9999999L; + private final long WINDOW = 20L; + + @Test + @Timeout(30) + public void testCoreMessageExpiryDelay() throws Exception { + testExpiry(createCoreConnection(), DelayType.NORMAL, false); + } + + @Test + @Timeout(30) + public void testAmqpMessageExpiryDelay() throws Exception { + testExpiry(createConnection(), DelayType.NORMAL, false); + } + + @Test + @Timeout(30) + public void testOpenWireMessageExpiryDelay() throws Exception { + testExpiry(createOpenWireConnection(), DelayType.NORMAL, false); + } Review Comment: Yeah, I got it reversed when reading then later commenting and shoudl ahve said 'seperately', so also reverse the resulting points that there are still gaps in the combination testing (as you just outlined). Ones a bus is likely to fit through given the near completely seperate handling of these things for the two message types. ########## tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/multiprotocol/JMSMessageExpiryTest.java: ########## @@ -0,0 +1,197 @@ +/* + * 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.tests.integration.jms.multiprotocol; + +import javax.jms.Connection; +import javax.jms.Message; +import javax.jms.MessageConsumer; +import javax.jms.MessageProducer; +import javax.jms.Queue; +import javax.jms.Session; +import java.lang.invoke.MethodHandles; + +import org.apache.activemq.artemis.core.settings.impl.AddressSettings; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Timeout; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +public class JMSMessageExpiryTest extends MultiprotocolJMSClientTestSupport { + + protected static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); + + private final long EXPIRY_DELAY = 9999999L; + private final long WINDOW = 20L; + + @Test + @Timeout(30) + public void testCoreMessageExpiryDelay() throws Exception { + testExpiry(createCoreConnection(), DelayType.NORMAL, false); + } + + @Test + @Timeout(30) + public void testAmqpMessageExpiryDelay() throws Exception { + testExpiry(createConnection(), DelayType.NORMAL, false); + } + + @Test + @Timeout(30) + public void testOpenWireMessageExpiryDelay() throws Exception { + testExpiry(createOpenWireConnection(), DelayType.NORMAL, false); + } Review Comment: Yeah, I got it reversed when reading then later commenting and should have said 'seperately', so also reverse the resulting points that there are still gaps in the combination testing (as you just outlined). Ones a bus is likely to fit through given the near completely seperate handling of these things for the two message types. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org For additional commands, e-mail: gitbox-h...@activemq.apache.org For further information, visit: https://activemq.apache.org/contact