You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2022/03/08 12:51:47 UTC
[camel] 06/09: CAMEL-17763: cleaned up unused exceptions in camel-couchbase
This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 7d6bdd0442866143a965e8774e65829d96bdda72
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Tue Mar 8 12:33:31 2022 +0100
CAMEL-17763: cleaned up unused exceptions in camel-couchbase
---
.../camel/component/couchbase/CouchbaseEndpointTest.java | 8 ++++----
.../camel/component/couchbase/CouchbaseProducerTest.java | 12 ++++++------
.../couchbase/integration/ConsumeMessagesWithLimitIT.java | 4 ++--
.../couchbase/integration/ProduceMessagesSimpleIT.java | 2 +-
.../couchbase/integration/ProduceMessagesWithAutoIDIT.java | 4 ++--
.../component/couchbase/integration/RemoveMessagesIT.java | 4 ++--
6 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/components/camel-couchbase/src/test/java/org/apache/camel/component/couchbase/CouchbaseEndpointTest.java b/components/camel-couchbase/src/test/java/org/apache/camel/component/couchbase/CouchbaseEndpointTest.java
index 646def3..bf050e2 100644
--- a/components/camel-couchbase/src/test/java/org/apache/camel/component/couchbase/CouchbaseEndpointTest.java
+++ b/components/camel-couchbase/src/test/java/org/apache/camel/component/couchbase/CouchbaseEndpointTest.java
@@ -45,7 +45,7 @@ public class CouchbaseEndpointTest {
}
@Test
- public void testHostnameRequired() throws Exception {
+ public void testHostnameRequired() {
final CouchbaseComponent component = new CouchbaseComponent();
assertThrows(IllegalArgumentException.class,
@@ -55,7 +55,7 @@ public class CouchbaseEndpointTest {
}
@Test
- public void testSchemeRequired() throws Exception {
+ public void testSchemeRequired() {
final CouchbaseComponent component = new CouchbaseComponent();
assertThrows(IllegalArgumentException.class,
@@ -70,7 +70,7 @@ public class CouchbaseEndpointTest {
}
@Test
- public void testCouchbaseEndpointWithoutProtocol() throws Exception {
+ public void testCouchbaseEndpointWithoutProtocol() {
final CouchbaseComponent component = new CouchbaseComponent();
assertThrows(IllegalArgumentException.class,
@@ -85,7 +85,7 @@ public class CouchbaseEndpointTest {
}
@Test
- public void testCouchbaseEndpointCreateProducer() throws Exception {
+ public void testCouchbaseEndpointCreateProducer() {
Map<String, Object> params = new HashMap<>();
params.put("bucket", "bucket");
diff --git a/components/camel-couchbase/src/test/java/org/apache/camel/component/couchbase/CouchbaseProducerTest.java b/components/camel-couchbase/src/test/java/org/apache/camel/component/couchbase/CouchbaseProducerTest.java
index bbc4710..bbb7ea1 100644
--- a/components/camel-couchbase/src/test/java/org/apache/camel/component/couchbase/CouchbaseProducerTest.java
+++ b/components/camel-couchbase/src/test/java/org/apache/camel/component/couchbase/CouchbaseProducerTest.java
@@ -74,7 +74,7 @@ public class CouchbaseProducerTest {
private CouchbaseProducer producer;
@BeforeEach
- public void before() throws Exception {
+ public void before() {
lenient().when(endpoint.getProducerRetryAttempts()).thenReturn(CouchbaseConstants.DEFAULT_PRODUCER_RETRIES);
lenient().when(endpoint.getProducerRetryAttempts()).thenReturn(3);
lenient().when(endpoint.getProducerRetryPause()).thenReturn(200);
@@ -85,31 +85,31 @@ public class CouchbaseProducerTest {
}
@Test
- public void testBodyMandatory() throws Exception {
+ public void testBodyMandatory() {
assertThrows(CouchbaseException.class,
() -> producer.process(exchange));
}
@Test
- public void testPersistToLowerThanSupported() throws Exception {
+ public void testPersistToLowerThanSupported() {
assertThrows(IllegalArgumentException.class,
() -> new CouchbaseProducer(endpoint, client, -1, 0));
}
@Test
- public void testPersistToHigherThanSupported() throws Exception {
+ public void testPersistToHigherThanSupported() {
assertThrows(IllegalArgumentException.class,
() -> new CouchbaseProducer(endpoint, client, 5, 0));
}
@Test
- public void testReplicateToLowerThanSupported() throws Exception {
+ public void testReplicateToLowerThanSupported() {
assertThrows(IllegalArgumentException.class,
() -> new CouchbaseProducer(endpoint, client, 0, -1));
}
@Test
- public void testReplicateToHigherThanSupported() throws Exception {
+ public void testReplicateToHigherThanSupported() {
assertThrows(IllegalArgumentException.class,
() -> new CouchbaseProducer(endpoint, client, 0, 4));
}
diff --git a/components/camel-couchbase/src/test/java/org/apache/camel/component/couchbase/integration/ConsumeMessagesWithLimitIT.java b/components/camel-couchbase/src/test/java/org/apache/camel/component/couchbase/integration/ConsumeMessagesWithLimitIT.java
index 4f58e6a..0170aed 100644
--- a/components/camel-couchbase/src/test/java/org/apache/camel/component/couchbase/integration/ConsumeMessagesWithLimitIT.java
+++ b/components/camel-couchbase/src/test/java/org/apache/camel/component/couchbase/integration/ConsumeMessagesWithLimitIT.java
@@ -43,10 +43,10 @@ public class ConsumeMessagesWithLimitIT extends CouchbaseIntegrationTestBase {
}
@Override
- protected RouteBuilder createRouteBuilder() throws Exception {
+ protected RouteBuilder createRouteBuilder() {
return new RouteBuilder() {
@Override
- public void configure() throws Exception {
+ public void configure() {
from(String.format("%s&designDocumentName=%s&viewName=%s&limit=10", getConnectionUri(), bucketName, bucketName))
.log("message received")
.to("mock:result");
diff --git a/components/camel-couchbase/src/test/java/org/apache/camel/component/couchbase/integration/ProduceMessagesSimpleIT.java b/components/camel-couchbase/src/test/java/org/apache/camel/component/couchbase/integration/ProduceMessagesSimpleIT.java
index 26f63c5..03507ce 100644
--- a/components/camel-couchbase/src/test/java/org/apache/camel/component/couchbase/integration/ProduceMessagesSimpleIT.java
+++ b/components/camel-couchbase/src/test/java/org/apache/camel/component/couchbase/integration/ProduceMessagesSimpleIT.java
@@ -41,7 +41,7 @@ public class ProduceMessagesSimpleIT extends CouchbaseIntegrationTestBase {
protected RouteBuilder createRouteBuilder() {
return new RouteBuilder() {
@Override
- public void configure() throws Exception {
+ public void configure() {
// need couchbase installed on localhost
from("direct:start").setHeader(CouchbaseConstants.HEADER_ID, constant("SimpleDocument_1"))
diff --git a/components/camel-couchbase/src/test/java/org/apache/camel/component/couchbase/integration/ProduceMessagesWithAutoIDIT.java b/components/camel-couchbase/src/test/java/org/apache/camel/component/couchbase/integration/ProduceMessagesWithAutoIDIT.java
index 8f1fc0c..118d8f4 100644
--- a/components/camel-couchbase/src/test/java/org/apache/camel/component/couchbase/integration/ProduceMessagesWithAutoIDIT.java
+++ b/components/camel-couchbase/src/test/java/org/apache/camel/component/couchbase/integration/ProduceMessagesWithAutoIDIT.java
@@ -34,10 +34,10 @@ public class ProduceMessagesWithAutoIDIT extends CouchbaseIntegrationTestBase {
}
@Override
- protected RouteBuilder createRouteBuilder() throws Exception {
+ protected RouteBuilder createRouteBuilder() {
return new RouteBuilder() {
@Override
- public void configure() throws Exception {
+ public void configure() {
from("direct:start").to(
getConnectionUri() + "&autoStartIdForInserts=true&startingIdForInsertsFrom=1000")
.to("mock:result");
diff --git a/components/camel-couchbase/src/test/java/org/apache/camel/component/couchbase/integration/RemoveMessagesIT.java b/components/camel-couchbase/src/test/java/org/apache/camel/component/couchbase/integration/RemoveMessagesIT.java
index 8951052..3199ffb 100644
--- a/components/camel-couchbase/src/test/java/org/apache/camel/component/couchbase/integration/RemoveMessagesIT.java
+++ b/components/camel-couchbase/src/test/java/org/apache/camel/component/couchbase/integration/RemoveMessagesIT.java
@@ -41,10 +41,10 @@ public class RemoveMessagesIT extends CouchbaseIntegrationTestBase {
}
@Override
- protected RouteBuilder createRouteBuilder() throws Exception {
+ protected RouteBuilder createRouteBuilder() {
return new RouteBuilder() {
@Override
- public void configure() throws Exception {
+ public void configure() {
from("direct:start")
.to(getConnectionUri() + "&operation=" + COUCHBASE_DELETE)
.to("mock:result");