[arquillian-issues] [JBoss JIRA] (ARQ-696) Last test's standard output is not saved - probably missing flush() ?

Pavel Janousek (Commented) (JIRA) jira-events at lists.jboss.org
Wed Dec 14 11:40:10 EST 2011


    [ https://issues.jboss.org/browse/ARQ-696?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12650963#comment-12650963 ] 

Pavel Janousek commented on ARQ-696:
------------------------------------

How to reproduce:
1. ls -l jboss-as/testsuite/integration/basic/target/surefire-reports (empty dir)
2. cd jboss-as/testsuite/integration/basic
3. mvn test -Dtest=org.jboss.as.test.integration.jaxrs.jsapi.* -fae
4. again ls -l jboss-as/testsuite/integration/basic/target/surefire-reports

see 3 files:{code}
[pjanouse at pjanouse surefire-reports]$ ls -l
total 12
-rw-rw-r--. 1 pjanouse pjanouse    0 Dec 14 17:26 org.jboss.as.test.integration.jaxrs.jsapi.JaxrsJSApiTestCase-output.txt
-rw-rw-r--. 1 pjanouse pjanouse  305 Dec 14 17:26 org.jboss.as.test.integration.jaxrs.jsapi.JaxrsJSApiTestCase.txt
-rw-rw-r--. 1 pjanouse pjanouse 4605 Dec 14 17:26 TEST-org.jboss.as.test.integration.jaxrs.jsapi.JaxrsJSApiTestCase.xml

[pjanouse at pjanouse surefire-reports]${code}

But if I duplicate JaxrsJSApiTestCase.java in the same dir to CopyOfJaxrsJSApiTestCase.java and execution was:
{code}

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.jboss.as.test.integration.jaxrs.jsapi.CopyOfJaxrsJSApiTestCase
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.272 sec
Running org.jboss.as.test.integration.jaxrs.jsapi.JaxrsJSApiTestCase
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.31 sec
{code}

I got this result:
{code}

[pjanouse at pjanouse surefire-reports]$ ls -l
total 36
-rw-rw-r--. 1 pjanouse pjanouse 11822 Dec 14 17:32 org.jboss.as.test.integration.jaxrs.jsapi.CopyOfJaxrsJSApiTestCase-output.txt
-rw-rw-r--. 1 pjanouse pjanouse   311 Dec 14 17:32 org.jboss.as.test.integration.jaxrs.jsapi.CopyOfJaxrsJSApiTestCase.txt
-rw-rw-r--. 1 pjanouse pjanouse     0 Dec 14 17:32 org.jboss.as.test.integration.jaxrs.jsapi.JaxrsJSApiTestCase-output.txt
-rw-rw-r--. 1 pjanouse pjanouse   304 Dec 14 17:32 org.jboss.as.test.integration.jaxrs.jsapi.JaxrsJSApiTestCase.txt
-rw-rw-r--. 1 pjanouse pjanouse  4623 Dec 14 17:32 TEST-org.jboss.as.test.integration.jaxrs.jsapi.CopyOfJaxrsJSApiTestCase.xml
-rw-rw-r--. 1 pjanouse pjanouse  4604 Dec 14 17:32 TEST-org.jboss.as.test.integration.jaxrs.jsapi.JaxrsJSApiTestCase.xml

[pjanouse at pjanouse surefire-reports]$ 
{code}

At first it looked as when output log grows more than buffer (8 KiB?), some flush was done, but in some other cases (org.jboss.as.test.integration.jaxrs.integration.ejb.*) last testcase is org.jboss.as.test.integration.jaxrs.integration.ejb.JaxrsEjbInterceptorsTestCase, but -output.txt is only 6772 bytes long, although it is correctly stored.
                
> Last test's standard output is not saved - probably missing flush() ?
> ---------------------------------------------------------------------
>
>                 Key: ARQ-696
>                 URL: https://issues.jboss.org/browse/ARQ-696
>             Project: Arquillian
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Base Implementation
>    Affects Versions: 1.0.0.CR5
>            Reporter: Ondrej Zizka
>
> When a suite of tests is run, the last test's stdout is not stored in ...-output.txt.
> It's always the last test, whichever it happens to be.
> It seems like Arquillian forgets to call a flush or something, and Surefire, not having anything in buffer, creates an empty file.
> Steps to reproduce with JBoss AS 7:

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the arquillian-issues mailing list