Test distribution

12 views
Skip to first unread message

Lars Pultz

unread,
Mar 12, 2007, 11:03:07 AM3/12/07
to testng...@googlegroups.com
Hi,
I have tried to run my tests in a master slave setup, but keep getting the exception below. Any ideas?

Best regards,
Lars Pultz

java.io.NotSerializableException: org.testng.internal.AnnotationTypeEnum
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
at org.testng.remote.RemoteWorker.sendSuite(RemoteWorker.java:31)
at org.testng.remote.RemoteSuiteWorker.run(RemoteSuiteWorker.java:26)
at org.testng.internal.thread.ThreadUtil$CountDownLatchedRunnable.run(ThreadUtil.java:160)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
at java.lang.Thread.run(Thread.java:534)
[TestNG] Reporter org.testng.reporters.SuiteHTMLReporter@1e152c5 failed
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:507)
at java.util.ArrayList.get(ArrayList.java:324)
at org.testng.reporters.SuiteHTMLReporter.generateReport(SuiteHTMLReporter.java:60)
at org.testng.TestNG.generateReports(TestNG.java:744)
at org.testng.TestNG.run(TestNG.java:730)
at org.testng.TestNG.privateMain(TestNG.java:1019)
at org.testng.TestNG.main(TestNG.java:997)
[TestNG] Reporter org.testng.reporters.FailedReporter@587c94 failed
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:507)
at java.util.ArrayList.get(ArrayList.java:324)
at org.testng.reporters.FailedReporter.generateReport(FailedReporter.java:44)
at org.testng.TestNG.generateReports(TestNG.java:744)
at org.testng.TestNG.run(TestNG.java:730)
at org.testng.TestNG.privateMain(TestNG.java:1019)
at org.testng.TestNG.main(TestNG.java:997)
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=70163&messageID=131679#131679

Steve Loughran

unread,
Mar 12, 2007, 11:52:51 AM3/12/07
to testng...@googlegroups.com
On 12/03/07, Lars Pultz <testng...@opensymphony.com> wrote:
>
> Hi,
> I have tried to run my tests in a master slave setup, but keep getting the exception below. Any ideas?
>
> Best regards,
> Lars Pultz
>
> java.io.NotSerializableException: org.testng.internal.AnnotationTypeEnum


Looks like this enum isnt marked as Serializable.

Cédric Beust ♔

unread,
Mar 12, 2007, 12:33:36 PM3/12/07
to testng...@googlegroups.com
Yup, this class was introduced after I made the test results serializable.  Based on the content of this class, making it Serializable should fix this problem.

--
Cedric

Steve Loughran

unread,
Mar 12, 2007, 12:35:18 PM3/12/07
to testng...@googlegroups.com
On 12/03/07, Cédric Beust ♔ <cbe...@google.com> wrote:
> Yup, this class was introduced after I made the test results serializable.
> Based on the content of this class, making it Serializable should fix this
> problem.
>

you can test for this, you know :)

Cédric Beust ♔

unread,
Mar 12, 2007, 12:40:50 PM3/12/07
to testng...@googlegroups.com
On 3/12/07, Steve Loughran <steve.l...@gmail.com> wrote:

I have tests, but I turned them off some time ago (shame).

--
Cédric

Steve Loughran

unread,
Mar 12, 2007, 1:08:51 PM3/12/07
to testng...@googlegroups.com
On 12/03/07, Cédric Beust ♔ <cbe...@google.com> wrote:
>
>
> On 3/12/07, Steve Loughran <steve.l...@gmail.com> wrote:
> > On 12/03/07, Cédric Beust ♔ <cbe...@google.com> wrote:
> > > Yup, this class was introduced after I made the test results
> serializable.
> > > Based on the content of this class, making it Serializable should fix
> this
> > > problem.
> > >
> >
> > you can test for this, you know :)
>
> I have tests, but I turned them off some time ago (shame).

why, were they failing?

To be fair, its hard to be 100% sure that your stuff
remotes/serializes properly without knowing exactly what stuff gets
serialized, which is only possible to determine when the things run,
though you can make a good guess in advance.

We do a lot of RMI based work and the only way to be 100% sure the
stuff will work across machines is to distribute the code for the test
runs. Even then, the whole complexity of RMI and re-entrancy is so
scary that you can never say "our code is fully free of reentrancy or
deadlock problems". The really scary bit? After a while, you start to
understand some of the design decisions behind EJB 2.x.

-steve

Lars Pultz

unread,
Mar 12, 2007, 1:17:55 PM3/12/07
to testng...@googlegroups.com
Yes, also my first thought. Just want to make sure I'm using the framework correctly. I dont hope the distribution part of TestNG is on its way out!

Best regards,


---------------------------------------------------------------------
Posted via Jive Forums

http://forums.opensymphony.com/thread.jspa?threadID=70163&messageID=131740#131740

Cédric Beust ♔

unread,
Mar 12, 2007, 1:29:25 PM3/12/07
to testng...@googlegroups.com
On 3/12/07, Lars Pultz <testng...@opensymphony.com> wrote:

Yes, also my first thought. Just want to make sure I'm using the framework correctly. I dont hope the distribution part of TestNG is on its way out!

Don't worry, it's definitely not on its way out, on the contrary.  All the important information (well, almost, as you found out) is Serializable, and I will definitely turn these tests back on now that I know that someone else is building on this support.

--
Cédric

Lars Pultz

unread,
Mar 13, 2007, 10:28:08 AM3/13/07
to testng...@googlegroups.com
Great! I'm looking forward to the next release

/Lars


---------------------------------------------------------------------
Posted via Jive Forums

http://forums.opensymphony.com/thread.jspa?threadID=70163&messageID=132049#132049

Reply all
Reply to author
Forward
0 new messages