commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ra...@apache.org
Subject svn commit: r600777 - /commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/SCXMLTestHelper.java
Date Tue, 04 Dec 2007 03:45:03 GMT
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;



Mime
View raw message