You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "ldrozdo (via GitHub)" <gi...@apache.org> on 2023/09/22 07:31:22 UTC

[GitHub] [camel-quarkus] ldrozdo opened a new pull request, #5333: Create basic Azure Servicebus tests

ldrozdo opened a new pull request, #5333:
URL: https://github.com/apache/camel-quarkus/pull/5333

   <!-- Uncomment and fill this section if your PR is not trivial
   [ ] An issue should be filed for the change unless this is a trivial change (fixing a typo or similar). One issue should ideally be fixed by not more than one commit and the other way round, each commit should fix just one issue, without pulling in other changes.
   [ ] Each commit in the pull request should have a meaningful and properly spelled subject line and body. Copying the title of the associated issue is typically enough. Please include the issue number in the commit message prefixed by #.
   [ ] The pull request description should explain what the pull request does, how, and why. If the info is available in the associated issue or some other external document, a link is enough.
   [ ] Phrases like Fix #<issueNumber> or Fixes #<issueNumber> will auto-close the named issue upon merging the pull request. Using them is typically a good idea.
   [ ] Please run mvn process-resources -Pformat (and amend the changes if necessary) before sending the pull request.
   [ ] Contributor guide is your good friend: https://camel.apache.org/camel-quarkus/latest/contributor-guide.html
   -->


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-quarkus] ldrozdo commented on a diff in pull request #5333: Create basic Azure Servicebus tests

Posted by "ldrozdo (via GitHub)" <gi...@apache.org>.
ldrozdo commented on code in PR #5333:
URL: https://github.com/apache/camel-quarkus/pull/5333#discussion_r1334345797


##########
integration-tests-jvm/azure-servicebus/src/test/java/org/apache/camel/quarkus/component/azure/servicebus/it/AzureServiceBusTest.java:
##########
@@ -0,0 +1,56 @@
+/*
+ * 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.camel.quarkus.component.azure.servicebus.it;
+
+import java.util.Arrays;
+import java.util.List;
+
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import io.restassured.http.ContentType;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
+
+@EnabledIfEnvironmentVariable(named = "AZURE_SERVICEBUS_CONNECTION_STRING", matches = ".+")
+@QuarkusTest
+class AzureServiceBusTest {
+
+    final List<String> inputBatch = Arrays.asList("Bulbasaur", "Pikachu", "Charizard", "Squirtle");
+
+    @Test
+    public void basicProducerConsumerTest() {
+        final List sentMessages = RestAssured.given()
+                .get("/azure-servicebus/producer")
+                .then().statusCode(200).extract().body().as(List.class);
+
+        Assertions.assertEquals(inputBatch, sentMessages);
+    }
+
+    @Test
+    public void basicConsumerTest() {

Review Comment:
   @aldettinger you are right, I've fixed it.



-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-quarkus] jamesnetherton merged pull request #5333: Create basic Azure Servicebus tests

Posted by "jamesnetherton (via GitHub)" <gi...@apache.org>.
jamesnetherton merged PR #5333:
URL: https://github.com/apache/camel-quarkus/pull/5333


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-quarkus] jamesnetherton commented on a diff in pull request #5333: Create basic Azure Servicebus tests

Posted by "jamesnetherton (via GitHub)" <gi...@apache.org>.
jamesnetherton commented on code in PR #5333:
URL: https://github.com/apache/camel-quarkus/pull/5333#discussion_r1334005552


##########
integration-tests-jvm/azure-servicebus/pom.xml:
##########
@@ -58,6 +58,22 @@
             <groupId>io.quarkus</groupId>
             <artifactId>quarkus-resteasy</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-direct</artifactId>

Review Comment:
   Whenever you add new Camel Quarkus extension dependencies to the test, the corresponding `-deployment` dependency needs to be added to the `virtualDependencies` profile (you'll find it at the end of the `pom.xml`). 



-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-quarkus] aldettinger commented on a diff in pull request #5333: Create basic Azure Servicebus tests

Posted by "aldettinger (via GitHub)" <gi...@apache.org>.
aldettinger commented on code in PR #5333:
URL: https://github.com/apache/camel-quarkus/pull/5333#discussion_r1334175455


##########
integration-tests-jvm/azure-servicebus/src/test/java/org/apache/camel/quarkus/component/azure/servicebus/it/AzureServiceBusTest.java:
##########
@@ -0,0 +1,56 @@
+/*
+ * 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.camel.quarkus.component.azure.servicebus.it;
+
+import java.util.Arrays;
+import java.util.List;
+
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import io.restassured.http.ContentType;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
+
+@EnabledIfEnvironmentVariable(named = "AZURE_SERVICEBUS_CONNECTION_STRING", matches = ".+")
+@QuarkusTest
+class AzureServiceBusTest {
+
+    final List<String> inputBatch = Arrays.asList("Bulbasaur", "Pikachu", "Charizard", "Squirtle");
+
+    @Test
+    public void basicProducerConsumerTest() {
+        final List sentMessages = RestAssured.given()
+                .get("/azure-servicebus/producer")
+                .then().statusCode(200).extract().body().as(List.class);
+
+        Assertions.assertEquals(inputBatch, sentMessages);
+    }
+
+    @Test
+    public void basicConsumerTest() {

Review Comment:
   Does the `basicConsumerTest` pass only when executed after the `basicProducerConsumerTest` ? If such ordering is needed, then we generally merge the two tests in a single one. 



-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-quarkus] ldrozdo commented on pull request #5333: Create basic Azure Servicebus tests

Posted by "ldrozdo (via GitHub)" <gi...@apache.org>.
ldrozdo commented on PR #5333:
URL: https://github.com/apache/camel-quarkus/pull/5333#issuecomment-1731101067

   @zbendhiba FYI :) 


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org