roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r1065462 - in /roller/trunk: pom.xml weblogger-business/src/test/java/org/apache/roller/weblogger/business/MediaFileTest.java
Date Mon, 31 Jan 2011 01:45:03 GMT
Author: snoopdave
Date: Mon Jan 31 01:45:03 2011
New Revision: 1065462

URL: http://svn.apache.org/viewvc?rev=1065462&view=rev
Log:
Another attempt to fix the odd JUnit test failure that happens on Apache's Hudson install.
This time, upgrading to latest OpenJPA (v2.0.1)

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

Modified: roller/trunk/pom.xml
URL: http://svn.apache.org/viewvc/roller/trunk/pom.xml?rev=1065462&r1=1065461&r2=1065462&view=diff
==============================================================================
--- roller/trunk/pom.xml (original)
+++ roller/trunk/pom.xml Mon Jan 31 01:45:03 2011
@@ -333,7 +333,7 @@
             <dependency>
                 <groupId>org.apache.openjpa</groupId>
                 <artifactId>openjpa</artifactId>
-                <version>2.0.0</version>
+                <version>2.0.1</version>
                 <scope>compile</scope>
             </dependency>
 

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=1065462&r1=1065461&r2=1065462&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 01:45:03 2011
@@ -650,8 +650,8 @@ public class MediaFileTest extends TestC
 	        //mfMgr.createMediaFileDirectory(rootDirectory);
 	        //TestUtils.endSession(true);
 	
-	        rootDirectory = mfMgr.getMediaFileDirectory(rootDirectory.getId());	
 	        for (int i = 0; i < 15; i++) {
+		        rootDirectory = mfMgr.getMediaFileDirectory(rootDirectory.getId());	
 		        testWeblog = TestUtils.getManagedWebsite(testWeblog);
 	            MediaFile mediaFile = new MediaFile();
 	            mediaFile.setName("test_file<index>.jpg".replace("<index>", i +
""));
@@ -659,12 +659,12 @@ public class MediaFileTest extends TestC
 	            mediaFile.setCopyrightText("test copyright text");
 	            mediaFile.setSharedForGallery(true);
 	            mediaFile.setLength(2000);
-	            mediaFile.setDirectory(rootDirectory);
 	            mediaFile.setWeblog(testWeblog);
 	            mediaFile.setInputStream(getClass().getResourceAsStream(TEST_IMAGE));
 	            mediaFile.setContentType("image/jpeg");
 	            mfMgr.createMediaFile(testWeblog, mediaFile, new RollerMessages());
 	            rootDirectory.getMediaFiles().add(mediaFile);
+	            mediaFile.setDirectory(rootDirectory);
 	            assertNotNull(mediaFile.getId());
 	            assertNotNull(mediaFile.getId().length() > 0);
 		        TestUtils.endSession(true);



Mime
View raw message