roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r1065447 - /roller/trunk/weblogger-business/src/test/java/org/apache/roller/weblogger/business/MediaFileTest.java
Date Mon, 31 Jan 2011 00:41:56 GMT
Author: snoopdave
Date: Mon Jan 31 00:41:55 2011
New Revision: 1065447

URL: http://svn.apache.org/viewvc?rev=1065447&view=rev
Log:
Attempting to fix odd JUnit test failure that happens on Apache's Hudson install: somehow
MediaFile.dateUdpate is apparently being set to the current time then inexplicably set back
to null before save. I can't duplicate this on my machine.

Modified:
    roller/trunk/weblogger-business/src/test/java/org/apache/roller/weblogger/business/MediaFileTest.java

Modified: roller/trunk/weblogger-business/src/test/java/org/apache/roller/weblogger/business/MediaFileTest.java
URL: http://svn.apache.org/viewvc/roller/trunk/weblogger-business/src/test/java/org/apache/roller/weblogger/business/MediaFileTest.java?rev=1065447&r1=1065446&r2=1065447&view=diff
==============================================================================
--- roller/trunk/weblogger-business/src/test/java/org/apache/roller/weblogger/business/MediaFileTest.java
(original)
+++ roller/trunk/weblogger-business/src/test/java/org/apache/roller/weblogger/business/MediaFileTest.java
Mon Jan 31 00:41:55 2011
@@ -651,10 +651,9 @@ public class MediaFileTest extends TestC
 	
 	        TestUtils.endSession(true);
 	
-	        testWeblog = TestUtils.getManagedWebsite(testWeblog);
-	        rootDirectory = mfMgr.getMediaFileDirectory(rootDirectory.getId());
-	
+	        rootDirectory = mfMgr.getMediaFileDirectory(rootDirectory.getId());	
 	        for (int i = 0; i < 15; i++) {
+		        testWeblog = TestUtils.getManagedWebsite(testWeblog);
 	            MediaFile mediaFile = new MediaFile();
 	            mediaFile.setName("test_file<index>.jpg".replace("<index>", i +
""));
 	            mediaFile.setDescription("This is a test image");
@@ -669,10 +668,10 @@ public class MediaFileTest extends TestC
 	            rootDirectory.getMediaFiles().add(mediaFile);
 	            assertNotNull(mediaFile.getId());
 	            assertNotNull(mediaFile.getId().length() > 0);
+		        TestUtils.endSession(true);
 	        }
-	        TestUtils.endSession(true);
+	        
 	        testWeblog = TestUtils.getManagedWebsite(testWeblog);
-	
 	        MediaFileFilter filter1 = new MediaFileFilter();
 	        filter1.setSize(1000);
 	        filter1.setSizeFilterType(SizeFilterType.GT);



Mime
View raw message