You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rg...@apache.org on 2017/10/02 15:34:44 UTC
qpid-broker-j git commit: QPID-7942 : [Java Broker] AppenderUtilsTest
does not work on Windows ... and this time update the right test
Repository: qpid-broker-j
Updated Branches:
refs/heads/master 2978c1288 -> 0e2f1e003
QPID-7942 : [Java Broker] AppenderUtilsTest does not work on Windows
... and this time update the right test
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/0e2f1e00
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/0e2f1e00
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/0e2f1e00
Branch: refs/heads/master
Commit: 0e2f1e003e1e8d2e653453587de83d192991ca40
Parents: 2978c12
Author: Rob Godfrey <rg...@apache.org>
Authored: Mon Oct 2 17:34:02 2017 +0200
Committer: Rob Godfrey <rg...@apache.org>
Committed: Mon Oct 2 17:34:02 2017 +0200
----------------------------------------------------------------------
.../logging/logback/AppenderUtilsTest.java | 22 +++++++++-----------
1 file changed, 10 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/0e2f1e00/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 142d7fb..99b26f8 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
@@ -38,7 +38,6 @@ import ch.qos.logback.core.rolling.RollingPolicy;
import ch.qos.logback.core.rolling.TimeBasedRollingPolicy;
import ch.qos.logback.core.rolling.TriggeringPolicy;
import ch.qos.logback.core.rolling.helper.CompressionMode;
-import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -154,15 +153,8 @@ public class AppenderUtilsTest extends QpidTestCase
try
{
- if(unwriteableFile.setWritable(false))
- {
- doValidateLogTarget(unwriteableFile);
- }
- else
- {
- _logger.warn("could not set permissions on temporary directory - test skipped");
-
- }
+ assertTrue("could not set log target permissions for test", unwriteableFile.setWritable(false));
+ doValidateLogTarget(unwriteableFile);
}
finally
{
@@ -177,8 +169,14 @@ public class AppenderUtilsTest extends QpidTestCase
try
{
- assumeTrue(unwriteableLogTarget.setWritable(false));
- doValidateLogTarget(new File(unwriteableLogTarget.getAbsolutePath(), "nonExistingFile.log"));
+ if(unwriteableLogTarget.setWritable(false))
+ {
+ doValidateLogTarget(new File(unwriteableLogTarget.getAbsolutePath(), "nonExistingFile.log"));
+ }
+ else
+ {
+ _logger.warn("could not set permissions on temporary directory - test skipped");
+ }
}
finally
{
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org