You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2023/05/23 17:40:46 UTC

[camel] branch main updated: Remove tests that depends on logging level output

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 7a0e38f7725 Remove tests that depends on logging level output
7a0e38f7725 is described below

commit 7a0e38f7725204ef3cd296c4cbbbc224f2f5501d
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue May 23 19:39:49 2023 +0200

    Remove tests that depends on logging level output
---
 .../camel/builder/endpoint/LogAdvancedTest.java    | 66 ----------------------
 .../camel/builder/endpoint/LogToDAdvancedTest.java | 66 ----------------------
 2 files changed, 132 deletions(-)

diff --git a/dsl/camel-endpointdsl/src/test/java/org/apache/camel/builder/endpoint/LogAdvancedTest.java b/dsl/camel-endpointdsl/src/test/java/org/apache/camel/builder/endpoint/LogAdvancedTest.java
deleted file mode 100644
index c5ec261e0ec..00000000000
--- a/dsl/camel-endpointdsl/src/test/java/org/apache/camel/builder/endpoint/LogAdvancedTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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.builder.endpoint;
-
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.spi.ExchangeFormatter;
-import org.apache.camel.support.processor.DefaultExchangeFormatter;
-import org.junit.jupiter.api.Test;
-
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-public class LogAdvancedTest extends BaseEndpointDslTest {
-
-    private final AtomicBoolean handled = new AtomicBoolean();
-
-    private ExchangeFormatter myFormatter = new DefaultExchangeFormatter() {
-        @Override
-        public String format(Exchange exchange) {
-            handled.set(true);
-            return "Hello";
-        }
-    };
-
-    @Test
-    public void testLog() throws Exception {
-        MockEndpoint mock = getMockEndpoint("mock:result");
-        mock.expectedMessageCount(10);
-
-        context.getRouteController().startAllRoutes();
-
-        MockEndpoint.assertIsSatisfied(context);
-
-        assertTrue(handled.get());
-    }
-
-    @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
-        return new EndpointRouteBuilder() {
-            @Override
-            public void configure() throws Exception {
-                from(timer("foo").delay(-1).period(0).repeatCount(10))
-                        .noAutoStartup()
-                        .to("mock:result")
-                        .to(log("foo").advanced().exchangeFormatter(myFormatter));
-            }
-        };
-    }
-}
diff --git a/dsl/camel-endpointdsl/src/test/java/org/apache/camel/builder/endpoint/LogToDAdvancedTest.java b/dsl/camel-endpointdsl/src/test/java/org/apache/camel/builder/endpoint/LogToDAdvancedTest.java
deleted file mode 100644
index 63145e210ba..00000000000
--- a/dsl/camel-endpointdsl/src/test/java/org/apache/camel/builder/endpoint/LogToDAdvancedTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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.builder.endpoint;
-
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.spi.ExchangeFormatter;
-import org.apache.camel.support.processor.DefaultExchangeFormatter;
-import org.junit.jupiter.api.Test;
-
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-public class LogToDAdvancedTest extends BaseEndpointDslTest {
-
-    private final AtomicBoolean handled = new AtomicBoolean();
-
-    private ExchangeFormatter myFormatter = new DefaultExchangeFormatter() {
-        @Override
-        public String format(Exchange exchange) {
-            handled.set(true);
-            return "Hello";
-        }
-    };
-
-    @Test
-    public void testLog() throws Exception {
-        MockEndpoint mock = getMockEndpoint("mock:result");
-        mock.expectedMessageCount(10);
-
-        context.getRouteController().startAllRoutes();
-
-        MockEndpoint.assertIsSatisfied(context);
-
-        assertTrue(handled.get());
-    }
-
-    @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
-        return new EndpointRouteBuilder() {
-            @Override
-            public void configure() throws Exception {
-                from(timer("foo").delay(-1).period(0).repeatCount(10))
-                        .noAutoStartup()
-                        .to("mock:result")
-                        .toD(log("foo").advanced().exchangeFormatter(myFormatter));
-            }
-        };
-    }
-}