activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r504029 - in /activemq/activeio/trunk/activeio-core: pom.xml src/main/java/org/apache/activeio/journal/active/LogFileManager.java src/test/java/org/apache/activeio/journal/active/JournalImplTest.java
Date Tue, 06 Feb 2007 08:33:57 GMT
Author: aco
Date: Tue Feb  6 00:33:56 2007
New Revision: 504029

URL: http://svn.apache.org/viewvc?view=rev&rev=504029
Log:
- Configure maven-compiler-plugin to use Java 1.5
- Dispose the files in the openArchiveLog to prevent test case from failing
- Re-added assert in test case

Modified:
    activemq/activeio/trunk/activeio-core/pom.xml
    activemq/activeio/trunk/activeio-core/src/main/java/org/apache/activeio/journal/active/LogFileManager.java
    activemq/activeio/trunk/activeio-core/src/test/java/org/apache/activeio/journal/active/JournalImplTest.java

Modified: activemq/activeio/trunk/activeio-core/pom.xml
URL: http://svn.apache.org/viewvc/activemq/activeio/trunk/activeio-core/pom.xml?view=diff&rev=504029&r1=504028&r2=504029
==============================================================================
--- activemq/activeio/trunk/activeio-core/pom.xml (original)
+++ activemq/activeio/trunk/activeio-core/pom.xml Tue Feb  6 00:33:56 2007
@@ -31,6 +31,16 @@
   <build>
     <plugins>
 
+      <!-- Use 1.5 compiler setting -->
+     <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
+        </configuration>
+      </plugin>
+
       <!-- generate the attached tests jar -->
       <plugin>
         <artifactId>maven-jar-plugin</artifactId>

Modified: activemq/activeio/trunk/activeio-core/src/main/java/org/apache/activeio/journal/active/LogFileManager.java
URL: http://svn.apache.org/viewvc/activemq/activeio/trunk/activeio-core/src/main/java/org/apache/activeio/journal/active/LogFileManager.java?view=diff&rev=504029&r1=504028&r2=504029
==============================================================================
--- activemq/activeio/trunk/activeio-core/src/main/java/org/apache/activeio/journal/active/LogFileManager.java
(original)
+++ activemq/activeio/trunk/activeio-core/src/main/java/org/apache/activeio/journal/active/LogFileManager.java
Tue Feb  6 00:33:56 2007
@@ -267,7 +267,6 @@
         if (disposed)
             return;
         this.disposed = true;
-        
         try {
 	        // Close all the opened log files.
 	        LogFileNode log = firstNode;
@@ -275,8 +274,12 @@
 	            log.getLogFile().dispose();
 	            log = log.getNext();
 	        } while (log != firstNode);
-	        
-	        loadedFromCleanShutDown=true;
+
+            for (Object entry : openArchivedLogs.values()) {
+                ((LogFile)entry).dispose();
+            }
+
+            loadedFromCleanShutDown=true;
 	        storeState();
 	        controlFile.dispose();
         } catch ( IOException e ) {        	
@@ -342,7 +345,7 @@
     }
     
     private File getArchiveFile(int logId) {
-        return  new File(archiveDirectory, "" + archiveLogNameFormat.format(logId) + ".log");
+        return new File(archiveDirectory, "" + archiveLogNameFormat.format(logId) + ".log");
     }
     
     RecordInfo readRecordInfo(Location location) throws IOException, InvalidRecordLocationException
{

Modified: activemq/activeio/trunk/activeio-core/src/test/java/org/apache/activeio/journal/active/JournalImplTest.java
URL: http://svn.apache.org/viewvc/activemq/activeio/trunk/activeio-core/src/test/java/org/apache/activeio/journal/active/JournalImplTest.java?view=diff&rev=504029&r1=504028&r2=504029
==============================================================================
--- activemq/activeio/trunk/activeio-core/src/test/java/org/apache/activeio/journal/active/JournalImplTest.java
(original)
+++ activemq/activeio/trunk/activeio-core/src/test/java/org/apache/activeio/journal/active/JournalImplTest.java
Tue Feb  6 00:33:56 2007
@@ -72,7 +72,7 @@
 		journal.close();
         if( logDirectory.exists() )
         	deleteDir(logDirectory);
-        //assertTrue( !logDirectory.exists() );
+        assertTrue( !logDirectory.exists() );
     }
     
     public void testLogFileCreation() throws IOException {



Mime
View raw message