Skip to content

Commit 1e1ff93

Browse files
committed
further fix for Timbuctoo
1 parent 2cd78fe commit 1e1ff93

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

jdk_11_maven/em/embedded/graphql/timbuctoo/src/main/java/em/embedded/nl/knaw/huygens/EmbeddedEvoMasterController.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,10 @@ public void resetStateOfSUT() {
143143
//FIXME: this fails due to locks on Neo4j. need way to reset it
144144
//deleteDir(new File(tmpFolder));
145145
if(!Files.exists(Path.of(tmpFolder))) {
146-
Files.createDirectory(Path.of(tmpFolder));
146+
Files.createDirectories(Path.of(tmpFolder));
147147
}
148-
Files.copy(Path.of(getClass().getClassLoader().getResource("users.json").toURI()), Path.of(tmpFolder,"users.json"), StandardCopyOption.REPLACE_EXISTING);
149-
Files.copy(Path.of(getClass().getClassLoader().getResource("logins.json").toURI()), Path.of(tmpFolder,"logins.json"), StandardCopyOption.REPLACE_EXISTING);
148+
Files.copy(getClass().getClassLoader().getResourceAsStream("users.json"), Path.of(tmpFolder,"users.json"), StandardCopyOption.REPLACE_EXISTING);
149+
Files.copy(getClass().getClassLoader().getResourceAsStream("logins.json"), Path.of(tmpFolder,"logins.json"), StandardCopyOption.REPLACE_EXISTING);
150150
}catch (Exception e){
151151
throw new RuntimeException(e);
152152
}

jdk_11_maven/em/external/graphql/timbuctoo/src/main/java/em/external/nl/knaw/huygens/ExternalEvoMasterController.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,11 @@ public void resetStateOfSUT() {
197197
//FIXME: this fails due to locks on Neo4j. need way to reset it
198198
//deleteDir(new File(tmpFolder));
199199
if(!Files.exists(Path.of(tmpFolder))) {
200-
Files.createDirectory(Path.of(tmpFolder));
200+
Files.createDirectories(Path.of(tmpFolder));
201201
}
202202

203-
Files.copy(Path.of(getClass().getClassLoader().getResource("users.json").toURI()), Path.of(tmpFolder,"users.json"), StandardCopyOption.REPLACE_EXISTING);
204-
Files.copy(Path.of(getClass().getClassLoader().getResource("logins.json").toURI()), Path.of(tmpFolder,"logins.json"), StandardCopyOption.REPLACE_EXISTING);
203+
Files.copy(getClass().getClassLoader().getResourceAsStream("users.json"), Path.of(tmpFolder,"users.json"), StandardCopyOption.REPLACE_EXISTING);
204+
Files.copy(getClass().getClassLoader().getResourceAsStream("logins.json"), Path.of(tmpFolder,"logins.json"), StandardCopyOption.REPLACE_EXISTING);
205205
}catch (Exception e){
206206
throw new RuntimeException(e);
207207
}

0 commit comments

Comments
 (0)