[ 
https://issues.apache.org/jira/browse/AMQ-8322?focusedWorklogId=767150&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-767150
 ]

ASF GitHub Bot logged work on AMQ-8322:
---------------------------------------

                Author: ASF GitHub Bot
            Created on: 06/May/22 11:46
            Start Date: 06/May/22 11:46
    Worklog Time Spent: 10m 
      Work Description: gemmellr commented on code in PR #729:
URL: https://github.com/apache/activemq/pull/729#discussion_r866748630


##########
activemq-unit-tests/src/test/java/org/apache/activemq/jms2/ActiveMQJMS2MessageTypesTest.java:
##########
@@ -0,0 +1,582 @@
+/**
+ * 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.jms2;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.UUID;
+
+import javax.jms.DeliveryMode;
+import javax.jms.Destination;
+import javax.jms.IllegalStateRuntimeException;
+import javax.jms.JMSConsumer;
+import javax.jms.JMSContext;
+import javax.jms.Message;
+import javax.jms.Session;
+import javax.jms.Topic;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+@RunWith(value = Parameterized.class)
+public class ActiveMQJMS2MessageTypesTest extends ActiveMQJMS2TestBase {
+
+    private final String clientID;
+    private final String destinationType;
+    private final String messagePayload;
+    private final String messageType;
+
+    public ActiveMQJMS2MessageTypesTest(String destinationType, String 
messageType) {
+        this.clientID = destinationType + "-" + messageType;
+        this.destinationType = destinationType;
+        this.messagePayload = "Test message payload";
+        this.messageType = messageType;
+    }
+
+    @Parameterized.Parameters(name="destinationType={0}, messageType={1}")
+    public static Collection<Object[]> data() {
+        return Arrays.asList(new Object[][] {
+                {"queue", "bytes"},
+                {"queue", "map"},
+                {"queue", "object"},
+                {"queue", "stream"},
+                {"queue", "text"},
+                {"topic", "bytes"},
+                {"topic", "map"},
+                {"topic", "object"},
+                {"topic", "stream"},
+                {"topic", "text"},
+                {"temp-queue", "bytes"},
+                {"temp-queue", "map"},
+                {"temp-queue", "object"},
+                {"temp-queue", "stream"},
+                {"temp-queue", "text"},
+                {"temp-topic", "bytes"},
+                {"temp-topic", "map"},
+                {"temp-topic", "object"},
+                {"temp-topic", "stream"},
+                {"temp-topic", "text"},

Review Comment:
   Look at what is being tested, it has basically nothing to do with different 
message types, certainly not different destination types. Its mostly a waste of 
time (3-7sec on examples given). Even if it did have something to do with 
those, coverage would be better achieved far faster with specific unit tests. 
Add a system test or two (not 20) if needed to check the already-tested units 
aren't somehow wired together backwards or not at all.
   
   "as long as isnt too slow" somewhat depends on your view. Sure, 3-7 seconds 
isnt much in itself, but it is when considering all thats actually being 
verified here. 3-7sec seems orders of magnitude too slow to me for whats being 
tested. A few seconds here, a few seconds there, is exactly how to end up with 
the test suite 5.x currently has. The problem cant ever get any better if 
keeping doing the same things and continually making it worse.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 767150)
    Time Spent: 14h 10m  (was: 14h)

> Implement JMS 2.0 Connection createContext methods
> --------------------------------------------------
>
>                 Key: AMQ-8322
>                 URL: https://issues.apache.org/jira/browse/AMQ-8322
>             Project: ActiveMQ
>          Issue Type: New Feature
>            Reporter: Matt Pavlovich
>            Assignee: Matt Pavlovich
>            Priority: Major
>              Labels: #jms2
>             Fix For: 5.18.0
>
>          Time Spent: 14h 10m
>  Remaining Estimate: 0h
>
> Add support for JMSContext, JMSProducer and JMSConsumer for working with 
> queues



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to