Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@

/**
* Captures the log events of one logger, down to DEBUG, while it is open. Only one capture is open at a time: opening
* another one resets the level of the loggers.
* another one resets the level of the loggers. The level is set for the whole JVM, so a test class that uses it is
* {@code @Isolated} and does not run in parallel with other test classes.
*/
final class LogCapture extends AbstractAppender implements AutoCloseable {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.parallel.Isolated;

import static org.awaitility.Awaitility.await;
import static org.junit.jupiter.api.Assertions.assertEquals;
Expand All @@ -46,7 +47,11 @@
* at WARN and the end of the run at INFO, instead of a WARN with a stack trace on every poll, while
* {@code bridgeErrorHandler} still gets every failure. Without {@code autoReconnect}, a lost connection shuts the
* endpoint down once, and the triggered consumer stops polling until the route is restarted.
* <p>
* Isolated because {@link LogCapture} changes the level of a logger of the JVM and {@link MockDriver} is programmed
* statically, so another test class must not run at the same time.
*/
@Isolated
public class Plc4XRepeatedFailureRouteTest extends CamelTestSupport {

private static final String PLC = "plc4x:mock:10.10.10.1/1/1?trigger=TRIG&period=50&tag.temperature=TEMP";
Expand Down
Loading