MacOS X Build

11 views
Skip to first unread message

Thomas.Haines

unread,
Feb 17, 2009, 7:31:10 AM2/17/09
to JODConverter
Has anyone managed to build the latest source on OS X? The code
compiles fine, but some of the tests fail. No jar file is created,
but the compiled class files are present.

I thought at first this may be an issue with the fact I was running
the build/tests on a slower machine and it may be timing out when
launching the process again, but I tried the same on a top-spec Xserve
with the same results. Interestingly, with the dock, you can see it
launch a new process before the old one has finished shutting down.
Not sure if that is relevant, but just a thought.

Does anyone have any suggestions? I have some OS X/Darwin/Java
knowledge and am happy to get hands dirty if someone can point me in
the right direction!

Cheers
Tom
Perth, Australia

The TestSuite.txt file is below.
----
-------------------------------------------------------------------------------
Test set: TestSuite
-------------------------------------------------------------------------------
Tests run: 8, Failures: 4, Errors: 0, Skipped: 0, Time elapsed: 80.039
sec <<< FAILURE!
executeTask
(net.sf.jodconverter.office.ExternalProcessOfficeManagerTest) Time
elapsed: 2.031 sec <<< FAILURE!
net.sf.jodconverter.office.OfficeException: could not connect to
external office process
at net.sf.jodconverter.office.ExternalProcessOfficeManager.connect
(ExternalProcessOfficeManager.java:94)
at net.sf.jodconverter.office.ExternalProcessOfficeManager.start
(ExternalProcessOfficeManager.java:68)
at
net.sf.jodconverter.office.ExternalProcessOfficeManagerTest.executeTask
(ExternalProcessOfficeManagerTest.java:42)
Caused by: java.net.ConnectException: connection failed:
'socket,host=127.0.0.1,port=8100,tcpNoDelay=1';
java.net.ConnectException: Connection refused
at net.sf.jodconverter.office.OfficeConnection.connect
(OfficeConnection.java:96)
at net.sf.jodconverter.office.ExternalProcessOfficeManager.connect
(ExternalProcessOfficeManager.java:92)
... 31 more

executeTask
(net.sf.jodconverter.office.ManagedProcessOfficeManagerTest) Time
elapsed: 32.513 sec <<< FAILURE!
java.lang.AssertionError: expected:<0> but was:<255>
at org.testng.Assert.fail(Assert.java:84)
at org.testng.Assert.failNotEquals(Assert.java:438)
at org.testng.Assert.assertEquals(Assert.java:108)
at org.testng.Assert.assertEquals(Assert.java:323)
at org.testng.Assert.assertEquals(Assert.java:333)
at
net.sf.jodconverter.office.ManagedProcessOfficeManagerTest.executeTask
(ManagedProcessOfficeManagerTest.java:57)

restartAfterTaskTimeout
(net.sf.jodconverter.office.ManagedProcessOfficeManagerTest) Time
elapsed: 6.1 sec <<< FAILURE!
java.lang.AssertionError: expected:<true> but was:<false>
at org.testng.Assert.fail(Assert.java:84)
at org.testng.Assert.failNotEquals(Assert.java:438)
at org.testng.Assert.assertTrue(Assert.java:32)
at org.testng.Assert.assertTrue(Assert.java:42)
at
net.sf.jodconverter.office.ManagedProcessOfficeManagerTest.restartAfterTaskTimeout
(ManagedProcessOfficeManagerTest.java:125)

restartAfterCrash
(net.sf.jodconverter.office.ManagedProcessOfficeManagerTest) Time
elapsed: 3.085 sec <<< FAILURE!
java.lang.AssertionError: expected:<true> but was:<false>
at org.testng.Assert.fail(Assert.java:84)
at org.testng.Assert.failNotEquals(Assert.java:438)
at org.testng.Assert.assertTrue(Assert.java:32)
at org.testng.Assert.assertTrue(Assert.java:42)
at
net.sf.jodconverter.office.ManagedProcessOfficeManagerTest.restartAfterCrash
(ManagedProcessOfficeManagerTest.java:89)


Mirko Nasato

unread,
Feb 17, 2009, 8:23:32 AM2/17/09
to jodcon...@googlegroups.com
Hi Tom,

Test failures are most likely caused by timeouts that needs to be tweaked for that particular system.

The quick and dirty workaround is just to skip tests with

$ mvn -Dmaven.test.skip=true package

I'd like to make tests less brittle, but it's difficult with things that take different amount of times on different machines like starting an external process.

Cheers

Mirko


2009/2/17 Thomas.Haines <thomas...@gmail.com>

Mirko Nasato

unread,
Feb 17, 2009, 2:29:02 PM2/17/09
to jodcon...@googlegroups.com
2009/2/17 Thomas.Haines <thomas...@gmail.com>

I thought at first this may be an issue with the fact I was running
the build/tests on a slower machine and it may be timing out when
launching the process again, but I tried the same on a top-spec Xserve
with the same results.

Sorry I missed this bit in my first reply. It's still likely that it's just sleep() times in the test that need adjusting.

But if you'd like to investigate further start from the first test that fails and run it on its own, then try changing sleep() times.

Cheers

Mirko

Thomas.Haines

unread,
Feb 17, 2009, 6:16:43 PM2/17/09
to JODConverter
Thanks Mirko, I'll look into it.

On Feb 18, 4:29 am, Mirko Nasato <mirko.nas...@gmail.com> wrote:
> 2009/2/17 Thomas.Haines <thomas.hai...@gmail.com>
Reply all
Reply to author
Forward
0 new messages