summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LoggerTest.java6
-rw-r--r--tools/runner/expectations/brokentests.txt12
2 files changed, 16 insertions, 2 deletions
diff --git a/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LoggerTest.java b/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LoggerTest.java
index c05b9a5..17233a1 100644
--- a/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LoggerTest.java
+++ b/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LoggerTest.java
@@ -38,6 +38,7 @@ import junit.framework.TestCase;
import org.apache.harmony.logging.tests.java.util.logging.util.EnvironmentHelper;
+import tests.support.resource.Support_Resources;
import tests.util.CallVerificationStack;
/**
@@ -53,7 +54,7 @@ public class LoggerTest extends TestCase {
private final static String INVALID_RESOURCE_BUNDLE = "impossible_not_existing";
- private final static String LOGGING_CONFIG_FILE = "src/test/resources/config/java/util/logging/logging.config";
+ private final static String LOGGING_CONFIG_FILE = "/config/java/util/logging/logging.config";
private final static String VALID_KEY = "LOGGERTEST";
@@ -3526,7 +3527,8 @@ public class LoggerTest extends TestCase {
* test initHandler
*/
public void test_initHandler() throws Exception {
- File logProps = new File(LOGGING_CONFIG_FILE);
+ File logProps = Support_Resources.getExternalLocalFile(
+ getClass().getResource(LOGGING_CONFIG_FILE).toString());
LogManager lm = LogManager.getLogManager();
lm.readConfiguration(new FileInputStream(logProps));
diff --git a/tools/runner/expectations/brokentests.txt b/tools/runner/expectations/brokentests.txt
index 75624ee..caf92e7 100644
--- a/tools/runner/expectations/brokentests.txt
+++ b/tools/runner/expectations/brokentests.txt
@@ -29,6 +29,18 @@ result EXEC_FAILED
pattern .*Test failed: should get token \[, but get -1.*
+# These tests only pass if the root logger hasn't yet been initialized. They
+# incorrectly assume that resetting the LogManager will clear the root logger's
+# resource bundle; this isn't the case.
+test org.apache.harmony.logging.tests.java.util.logging.LoggerTest#testGetLoggerWithRes_InvalidResourceBundle
+result EXEC_FAILED
+pattern .*java.lang.IllegalArgumentException: Resource bundle name 'impossible_not_existing' is inconsistent.*
+
+test org.apache.harmony.logging.tests.java.util.logging.LoggerTest#testGetLogger_Empty
+result EXEC_FAILED
+pattern .*junit.framework.AssertionFailedError.*
+
+
# Dalvik doesn't include the "SunJCE" crypto provider
test com.sun.crypto.provider.Cipher.AES.Test4513830
result EXEC_FAILED