[XAM Developer] Reference VIM failing on test -- fix included

4 views
Skip to first unread message

Andy Thomson

unread,
May 19, 2010, 12:05:11 PM5/19/10
to XAM Developers Group

When running the SDK in a Mavenized environment the Reference VIM will
fail on the AsynchronousOperation test. The error returned by the test
is a "FieldExistsException". This is actually a correct error, however
it's not what the test was attempting to accomplish.

The error is produced due to an earlier test creating an XSet property
called "REF_VIM_ASYNC_THREAD_COUNT". To correct this, the method
testXSystemXSetOps() in the AsynchronousOperations.java class needs to
have a conditional check added.

The class is located here:

Java_Reference_VIM/test/org/snia/xam/vim/reference/

AsynchronousOperationTest.java

Change line 125 from this:

s_xam.createProperty( ReferenceXSystem.REF_VIM_ASYNC_THREAD_COUNT,
false, 2 );

to this:

----
//s_xam.createProperty( ReferenceXSystem.REF_VIM_ASYNC_THREAD_COUNT,
false, 2 );

if (s_xam.containsField(ReferenceXSystem.REF_VIM_ASYNC_THREAD_COUNT)) {
s_xam.setProperty(ReferenceXSystem.REF_VIM_ASYNC_THREAD_COUNT, 2);
} else {
s_xam.createProperty(ReferenceXSystem.REF_VIM_ASYNC_THREAD_COUNT,
false, 2);
}
----

After making the above change all of the Reference Vim tests will
complete successfully. An expected output from a successful test run is
shown below.

[Maven]

Results :

Tests run: 226, Failures: 0, Errors: 0, Skipped: 0

[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 5 minutes 31 seconds
[INFO] Finished at: Wed May 19 09:54:17 MDT 2010
[INFO] Final Memory: 31M/152M
[INFO]
------------------------------------------------------------------------

Not sure if the same error appears running the ant test, I don't use it.
I only started looking at the SDK tests because of the problems that
Ludovic Deveaux is observing.

If anyone is interested in a Maven XAM SDK template, post a request
here, and I'll send one. If I get lot's of requests I'll see if I can
have Mike A add it to Google code group site.

Andy Thomson

--
You received this message because you are subscribed to the "XAM Developers Group" group.
To post to this group, send email to
xam-develo...@googlegroups.com
To unsubscribe from this group, send email to
xam-developers-g...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/xam-developers-group?hl=en
Reminder that due to the SNIA IP Policy, only bug reports can be accepted as feedback for the specification or code.
Reply all
Reply to author
Forward
0 new messages