arquillian / arquillian-cube

Control (docker, kubernetes, openshift) containers in your tests with ease!
http://arquillian.org/arquillian-cube/
120 stars 98 forks source link

Unable to use log await strategy #502

Closed jamesnetherton closed 7 years ago

jamesnetherton commented 7 years ago

I've been trying to get the log await strategy working, so far with no success. Tested against WildFly and Tomcat images.

When debugging, I never see onNext() in LogScanningAwaitStrategy get called. So no match logic ever seems to get done against the container logs, even though the container is successfully started.

Some details about my environment - I run Fedora 24 with the Fedora Docker package installed (not the official Docker RPM):

$ docker version
Client:
 Version:         1.10.3
 API version:     1.22
 Package version: docker-1.10.3-53.gite03ddb8.fc24.x86_64
 Go version:      go1.6.3
 Git commit:      e03ddb8/1.10.3
 Built:           
 OS/Arch:         linux/amd64

Server:
 Version:         1.10.3
 API version:     1.22
 Package version: docker-1.10.3-53.gite03ddb8.fc24.x86_64
 Go version:      go1.6.3
 Git commit:      e03ddb8/1.10.3
 Built:           
 OS/Arch:         linux/amd64

Here's an example arquillian.xml config for Tomcat:

<extension qualifier="docker">
    <property name="definitionFormat">CUBE</property>
    <property name="dockerContainers">
        tomcat:
            image: tutum/tomcat:7.0
            exposedPorts: [8089/tcp]
            await:
                strategy: log
                match: Server startup
                stdOut: true
                stdErr: true
                sleepPollingTime: 10 s
                iterations: 6
            env: [TOMCAT_PASS=mypass, JAVA_OPTS=-Dcom.sun.management.jmxremote.port=8089 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false]
            portBindings: [8089/tcp, 8080/tcp]
    </property>
</extension>

<container qualifier="tomcat" default="true">
    <configuration>
        <property name="host">localhost</property>
        <property name="httpPort">8080</property>
        <property name="user">admin</property>
        <property name="pass">mypass</property>
    </configuration>
</container>
lordofthejars commented 7 years ago

Thank you very much for reporting this, tomorrow morning I will take a look.

El 24 oct. 2016 9:19 p. m., "James Netherton" notifications@github.com escribió:

I've been trying to get the log await strategy working, so far with no success. Tested against WildFly and Tomcat images.

When debugging, I never see onNext() https://github.com/arquillian/arquillian-cube/blob/308287ec56a091d473309f21dcd3dff9f6a4fdf5/docker/docker/src/main/java/org/arquillian/cube/docker/impl/await/LogScanningAwaitStrategy.java#L127-L135 in LogScanningAwaitStrategy get called. So no match logic ever seems to get done against the container logs, even though the container is successfully started.

Some details about my environment - I run Fedora 24 with the Fedora Docker package installed (not the official Docker RPM):

$ docker version Client: Version: 1.10.3 API version: 1.22 Package version: docker-1.10.3-53.gite03ddb8.fc24.x86_64 Go version: go1.6.3 Git commit: e03ddb8/1.10.3 Built: OS/Arch: linux/amd64

Server: Version: 1.10.3 API version: 1.22 Package version: docker-1.10.3-53.gite03ddb8.fc24.x86_64 Go version: go1.6.3 Git commit: e03ddb8/1.10.3 Built: OS/Arch: linux/amd64

Here's an example arquillian.xml config for Tomcat:

CUBE tomcat: image: tutum/tomcat:7.0 exposedPorts: [8089/tcp] await: strategy: log match: Server startup stdOut: true stdErr: true sleepPollingTime: 10 s iterations: 6 env: [TOMCAT_PASS=mypass, JAVA_OPTS=-Dcom.sun.management.jmxremote.port=8089 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false] portBindings: [8089/tcp, 8080/tcp] localhost 8080 admin mypass

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/arquillian/arquillian-cube/issues/502, or mute the thread https://github.com/notifications/unsubscribe-auth/ABcmYa3AMzv2OVk2EQWM_WqGOQ9b_N4Mks5q3QTXgaJpZM4KfLYB .