qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgodf...@apache.org
Subject qpid-broker-j git commit: QPID-7942 : [Java Broker] AppenderUtilsTest does not work on Windows Address comments from [~gemmellr]
Date Mon, 02 Oct 2017 10:08:52 GMT
Repository: qpid-broker-j
Updated Branches:
  refs/heads/master 97647160d -> af10b7e4b


QPID-7942 : [Java Broker] AppenderUtilsTest does not work on Windows
Address comments from [~gemmellr]


Project: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/commit/af10b7e4
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/af10b7e4
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/af10b7e4

Branch: refs/heads/master
Commit: af10b7e4b57f058ab94a439e0a899fe7f1f6a3b2
Parents: 9764716
Author: Robert Godfrey <rgodfrey@apache.org>
Authored: Mon Oct 2 12:08:10 2017 +0200
Committer: Robert Godfrey <rgodfrey@apache.org>
Committed: Mon Oct 2 12:08:10 2017 +0200

----------------------------------------------------------------------
 .../server/logging/logback/AppenderUtilsTest.java  | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/af10b7e4/broker-plugins/logging-logback/src/test/java/org/apache/qpid/server/logging/logback/AppenderUtilsTest.java
----------------------------------------------------------------------
diff --git a/broker-plugins/logging-logback/src/test/java/org/apache/qpid/server/logging/logback/AppenderUtilsTest.java
b/broker-plugins/logging-logback/src/test/java/org/apache/qpid/server/logging/logback/AppenderUtilsTest.java
index e73fafd..aee727d 100644
--- a/broker-plugins/logging-logback/src/test/java/org/apache/qpid/server/logging/logback/AppenderUtilsTest.java
+++ b/broker-plugins/logging-logback/src/test/java/org/apache/qpid/server/logging/logback/AppenderUtilsTest.java
@@ -20,6 +20,7 @@
  */
 package org.apache.qpid.server.logging.logback;
 
+import static org.junit.Assume.assumeTrue;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
@@ -162,16 +163,14 @@ public class AppenderUtilsTest extends QpidTestCase
         Path unwriteableLogTargetPath = Files.createTempDirectory(getTestName());
         File unwriteableLogTarget = unwriteableLogTargetPath.toFile();
 
-        if(unwriteableLogTarget.setWritable(false))
+        try
         {
-            try
-            {
-                doValidateLogTarget(new File(unwriteableLogTarget.getAbsolutePath(), "nonExistingFile.log"));
-            }
-            finally
-            {
-                unwriteableLogTarget.delete();
-            }
+            assumeTrue(unwriteableLogTarget.setWritable(false));
+            doValidateLogTarget(new File(unwriteableLogTarget.getAbsolutePath(), "nonExistingFile.log"));
+        }
+        finally
+        {
+            unwriteableLogTarget.delete();
         }
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message