Skip to content

Commit c85a803

Browse files
committed
test: a tweak to fix a test failure
These changes fix a test failure that happened in my dev environment. They make sure to use a directory created by @tempdir, rather than just using java.io.tmpdir (a very full/messy tmp directory was causing one of the config tests to fail). Also, a new .gitignore hides the intellij download created for tests in agent/test/intellij.
1 parent b60aac6 commit c85a803

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

agent/src/test/java/com/appland/appmap/config/AppMapConfigTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public void loadBadDirectory() throws Exception {
3737
public void createDefault() throws IOException {
3838
// Just verify that the file gets created when it should. The contents
3939
// get verified elsewhere.
40-
Path configFile = Paths.get(System.getProperty("java.io.tmpdir"), "appmap.yml");
40+
Path configFile = tmpdir.resolve("appmap.yml");
4141
Files.deleteIfExists(configFile);
4242
AppMapConfig.load(configFile, false);
4343
assertTrue(Files.exists(configFile));
@@ -55,7 +55,7 @@ public void preservesExisting() throws IOException {
5555

5656
@Test
5757
public void requiresExisting() throws Exception {
58-
Path configFile = Paths.get(System.getProperty("java.io.tmpdir"), "appmap.yml");
58+
Path configFile = tmpdir.resolve("appmap.yml");
5959
Files.deleteIfExists(configFile);
6060

6161
String actualErr = tapSystemErr(() -> AppMapConfig.load(configFile, true));

agent/test/intellij/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
appmap-intellij-plugin

0 commit comments

Comments
 (0)