Skip to content

Commit 689883c

Browse files
committed
GH-4886 don't swallow exceptions and always shutdown repo
1 parent 5f512b6 commit 689883c

3 files changed

Lines changed: 4 additions & 14 deletions

File tree

testsuites/sparql/src/main/java/org/eclipse/rdf4j/testsuite/query/parser/sparql/manifest/SPARQL11UpdateComplianceTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ public void setUp() throws Exception {
207207
}
208208
}
209209

210-
expectedResultRepo = createRepository();
210+
expectedResultRepo = new SailRepository(new MemoryStore());
211211

212212
try (RepositoryConnection conn = expectedResultRepo.getConnection()) {
213213
conn.clear();

testsuites/sparql/src/main/java/org/eclipse/rdf4j/testsuite/query/parser/sparql/manifest/SPARQLComplianceTest.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,14 @@ public DynamicSparqlComplianceTest(String displayName, String testURI, String na
6767
this.name = name;
6868
}
6969

70-
public void test() {
70+
public void test() throws Exception {
7171
assumeThat(getIgnoredTests().contains(getName())).withFailMessage("test case '%s' is ignored", getName())
7272
.isFalse();
7373
try {
7474
setUp();
7575
runTest();
76-
} catch (Exception e) {
77-
try {
78-
tearDown();
79-
} catch (Exception e2) {
80-
81-
}
76+
} finally {
77+
tearDown();
8278
}
8379
}
8480

testsuites/sparql/src/main/java/org/eclipse/rdf4j/testsuite/sparql/tests/BuiltinFunctionTest.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,6 @@ private void testSES2052If1(RepositoryConnection conn) throws Exception {
242242
assertNotNull(p);
243243
assertEquals(RDF.TYPE, p);
244244
}
245-
} catch (Exception e) {
246-
e.printStackTrace();
247-
fail(e.getMessage());
248245
}
249246
}
250247

@@ -266,9 +263,6 @@ private void testSES2052If2(RepositoryConnection conn) throws Exception {
266263
assertNotNull(p);
267264
assertEquals(RDF.TYPE, p);
268265
}
269-
} catch (Exception e) {
270-
e.printStackTrace();
271-
fail(e.getMessage());
272266
}
273267
}
274268

0 commit comments

Comments
 (0)