roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r1065459 - in /roller/trunk/weblogger-business/src: main/java/org/apache/roller/weblogger/business/jpa/ main/java/org/apache/roller/weblogger/pojos/ test/java/org/apache/roller/weblogger/business/
Date Mon, 31 Jan 2011 01:12:17 GMT
Author: snoopdave
Date: Mon Jan 31 01:12:17 2011
New Revision: 1065459

URL: http://svn.apache.org/viewvc?rev=1065459&view=rev
Log:
Another attempt to fix the odd JUnit test failure that happens on Apache's Hudson install.

Modified:
    roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/business/jpa/JPAMediaFileManagerImpl.java
    roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/pojos/MediaFile.java
    roller/trunk/weblogger-business/src/test/java/org/apache/roller/weblogger/business/MediaFileTest.java

Modified: roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/business/jpa/JPAMediaFileManagerImpl.java
URL: http://svn.apache.org/viewvc/roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/business/jpa/JPAMediaFileManagerImpl.java?rev=1065459&r1=1065458&r2=1065459&view=diff
==============================================================================
--- roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/business/jpa/JPAMediaFileManagerImpl.java
(original)
+++ roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/business/jpa/JPAMediaFileManagerImpl.java
Mon Jan 31 01:12:17 2011
@@ -265,9 +265,6 @@ public class JPAMediaFileManagerImpl imp
         if (!cmgr.canSave(weblog, mediaFile.getName(), mediaFile.getContentType(), mediaFile.getLength(),
errors)) {
             return;
         }
-
-        mediaFile.setDateUploaded(new Timestamp(System.currentTimeMillis()));
-        mediaFile.setLastUpdated(mediaFile.getDateUploaded());
         strategy.store(mediaFile);
 
         // update weblog last modified date.  date updated by saveWeblog()

Modified: roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/pojos/MediaFile.java
URL: http://svn.apache.org/viewvc/roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/pojos/MediaFile.java?rev=1065459&r1=1065458&r2=1065459&view=diff
==============================================================================
--- roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/pojos/MediaFile.java
(original)
+++ roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/pojos/MediaFile.java
Mon Jan 31 01:12:17 2011
@@ -49,8 +49,8 @@ public class MediaFile {
     private int         thumbnailWidth = -1;
     private String      contentType;
     private String      originalPath;
-    private Timestamp   dateUploaded;
-    private Timestamp   lastUpdated;
+    private Timestamp   dateUploaded = new Timestamp(System.currentTimeMillis());
+    private Timestamp   lastUpdated = new Timestamp(System.currentTimeMillis());
     private String      creatorUserName;
     private Weblog      weblog;
 

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=1065459&r1=1065458&r2=1065459&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:12:17 2011
@@ -648,8 +648,7 @@ public class MediaFileTest extends TestC
 	
 	        //MediaFileDirectory rootDirectory = new MediaFileDirectory(null, "root", "root
d", testWeblog);
 	        //mfMgr.createMediaFileDirectory(rootDirectory);
-	
-	        TestUtils.endSession(true);
+	        //TestUtils.endSession(true);
 	
 	        rootDirectory = mfMgr.getMediaFileDirectory(rootDirectory.getId());	
 	        for (int i = 0; i < 15; i++) {



Mime
View raw message