All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.quarkus.test.logging.TestContainersLoggingHandler Maven / Gradle / Ivy

There is a newer version: 1.6.0.Beta14
Show newest version
package io.quarkus.test.logging;

import org.testcontainers.containers.GenericContainer;

import io.quarkus.test.bootstrap.Service;

public class TestContainersLoggingHandler extends ServiceLoggingHandler {

    private final GenericContainer container;

    private String oldLogs;

    public TestContainersLoggingHandler(Service service, GenericContainer container) {
        super(service);
        this.container = container;
    }

    @Override
    protected synchronized void handle() {
        String newLogs = container.getLogs();
        onStringDifference(newLogs, oldLogs);
        oldLogs = newLogs;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy