You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ra...@apache.org on 2007/12/04 04:45:03 UTC

svn commit: r600777 - /commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/SCXMLTestHelper.java

Author: rahul
Date: Mon Dec  3 19:45:02 2007
New Revision: 600777

URL: http://svn.apache.org/viewvc?rev=600777&view=rev
Log:
Skip serialization tests (but spew messages to System.err) if necessary directory cannot be created.

Modified:
    commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/SCXMLTestHelper.java

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/SCXMLTestHelper.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/SCXMLTestHelper.java?rev=600777&r1=600776&r2=600777&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/SCXMLTestHelper.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/SCXMLTestHelper.java Mon Dec  3 19:45:02 2007
@@ -80,6 +80,7 @@
         }
         Assert.assertNotNull(scxml);
         SCXML roundtrip = testModelSerializability(scxml);
+        Assert.assertNotNull(roundtrip);
         return roundtrip;
     }
 
@@ -259,7 +260,8 @@
     public static SCXML testModelSerializability(final SCXML scxml) {
         File fileDir = new File(SERIALIZATION_DIR);
         if (!fileDir.exists() && !fileDir.mkdir()) {
-            return null;
+            System.err.println("SKIPPED SERIALIZATION: Failed directory creation");
+            return scxml;
         }
         String filename = SERIALIZATION_FILE_PREFIX
             + System.currentTimeMillis() + SERIALIZATION_FILE_SUFFIX;
@@ -289,7 +291,8 @@
     public static SCXMLExecutor testExecutorSerializability(final SCXMLExecutor exec) {
         File fileDir = new File(SERIALIZATION_DIR);
         if (!fileDir.exists() && !fileDir.mkdir()) {
-            return null;
+            System.err.println("SKIPPED SERIALIZATION: Failed directory creation");
+            return exec;
         }
         String filename = SERIALIZATION_FILE_PREFIX
             + System.currentTimeMillis() + SERIALIZATION_FILE_SUFFIX;