This is an automated email from the ASF dual-hosted git repository.
atul pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git
The following commit(s) were added to refs/heads/master by this push:
new 0ab8b6e Improve test (#10480)
0ab8b6e is described below
commit 0ab8b6e0a969024c5cb0b2034204f108c153a3c0
Author: Atul Mohan <[email protected]>
AuthorDate: Wed Oct 7 08:40:02 2020 -0500
Improve test (#10480)
---
.../java/org/apache/druid/java/util/common/FileUtilsTest.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git
a/core/src/test/java/org/apache/druid/java/util/common/FileUtilsTest.java
b/core/src/test/java/org/apache/druid/java/util/common/FileUtilsTest.java
index 446339e..a20784f 100644
--- a/core/src/test/java/org/apache/druid/java/util/common/FileUtilsTest.java
+++ b/core/src/test/java/org/apache/druid/java/util/common/FileUtilsTest.java
@@ -103,12 +103,14 @@ public class FileUtilsTest
@Test
public void testCreateTempDirNonexistentBase()
{
+ final String oldJavaTmpDir = System.getProperty("java.io.tmpdir");
+ final String nonExistentDir = oldJavaTmpDir + "/nonexistent";
+
expectedException.expect(IllegalStateException.class);
- expectedException.expectMessage("java.io.tmpdir (/nonexistent) does not
exist");
+ expectedException.expectMessage(StringUtils.format("java.io.tmpdir (%s)
does not exist", nonExistentDir));
- final String oldJavaTmpDir = System.getProperty("java.io.tmpdir");
try {
- System.setProperty("java.io.tmpdir", "/nonexistent");
+ System.setProperty("java.io.tmpdir", nonExistentDir);
FileUtils.createTempDir();
}
finally {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]