Skip to content

Commit 8abc20e

Browse files
committed
mostly functional
1 parent 3eae7e4 commit 8abc20e

15 files changed

Lines changed: 24 additions & 145 deletions

File tree

testsuites/lucene/src/main/java/org/eclipse/testsuite/rdf4j/sail/lucene/AbstractLuceneSailGeoSPARQLTest.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import java.util.LinkedHashMap;
2020
import java.util.List;
2121
import java.util.Map;
22-
import java.util.concurrent.TimeUnit;
2322

2423
import org.eclipse.rdf4j.model.IRI;
2524
import org.eclipse.rdf4j.model.Literal;
@@ -42,9 +41,7 @@
4241
import org.eclipse.rdf4j.sail.memory.MemoryStore;
4342
import org.junit.After;
4443
import org.junit.Before;
45-
import org.junit.Rule;
4644
import org.junit.Test;
47-
import org.junit.rules.Timeout;
4845

4946
public abstract class AbstractLuceneSailGeoSPARQLTest {
5047

@@ -85,9 +82,6 @@ public abstract class AbstractLuceneSailGeoSPARQLTest {
8582

8683
private static final double ERROR = 2.0;
8784

88-
@Rule
89-
public Timeout timeout = Timeout.millis(TimeUnit.MINUTES.toMillis(5));
90-
9185
protected LuceneSail sail;
9286

9387
protected Repository repository;

testsuites/lucene/src/main/java/org/eclipse/testsuite/rdf4j/sail/lucene/AbstractLuceneSailIndexedPropertiesTest.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import java.io.IOException;
2424
import java.util.ArrayList;
2525
import java.util.Properties;
26-
import java.util.concurrent.TimeUnit;
2726

2827
import org.eclipse.rdf4j.model.IRI;
2928
import org.eclipse.rdf4j.model.ValueFactory;
@@ -42,17 +41,12 @@
4241
import org.eclipse.rdf4j.sail.memory.MemoryStore;
4342
import org.junit.After;
4443
import org.junit.Before;
45-
import org.junit.Rule;
4644
import org.junit.Test;
47-
import org.junit.rules.Timeout;
4845

4946
public abstract class AbstractLuceneSailIndexedPropertiesTest {
5047

5148
private static final ValueFactory vf = SimpleValueFactory.getInstance();
5249

53-
@Rule
54-
public Timeout timeout = Timeout.millis(TimeUnit.MINUTES.toMillis(5));
55-
5650
protected LuceneSail sail;
5751

5852
protected Repository repository;

testsuites/model/src/main/java/org/eclipse/rdf4j/testsuite/model/ModelTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
*******************************************************************************/
1111
package org.eclipse.rdf4j.testsuite.model;
1212

13+
import static java.util.concurrent.TimeUnit.MILLISECONDS;
1314
import static org.assertj.core.api.Assertions.assertThat;
1415
import static org.junit.jupiter.api.Assertions.assertEquals;
1516
import static org.junit.jupiter.api.Assertions.assertFalse;
@@ -20,7 +21,6 @@
2021
import java.util.ConcurrentModificationException;
2122
import java.util.Iterator;
2223
import java.util.Set;
23-
import java.util.concurrent.TimeUnit;
2424

2525
import org.eclipse.rdf4j.model.BNode;
2626
import org.eclipse.rdf4j.model.IRI;
@@ -47,7 +47,7 @@
4747
* @author Peter Ansell
4848
*/
4949
@TestInstance(Lifecycle.PER_CLASS)
50-
@Timeout(value = 5, unit = TimeUnit.MINUTES)
50+
@Timeout(value = 1000, unit = MILLISECONDS)
5151
public abstract class ModelTest {
5252

5353
protected Literal literal1;

testsuites/repository/src/main/java/org/eclipse/rdf4j/testsuite/repository/RepositoryTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
*
4242
* @author Jeen Broekstra
4343
*/
44-
@Timeout(value = 5, unit = TimeUnit.MINUTES)
44+
@Timeout(value = 1, unit = TimeUnit.MINUTES)
4545
public abstract class RepositoryTest {
4646

4747
@BeforeAll

testsuites/repository/src/main/java/org/eclipse/rdf4j/testsuite/repository/optimistic/DeadLockTest.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import static org.junit.Assert.assertNull;
1414

1515
import java.util.concurrent.CountDownLatch;
16-
import java.util.concurrent.TimeUnit;
1716

1817
import org.eclipse.rdf4j.common.transaction.IsolationLevel;
1918
import org.eclipse.rdf4j.common.transaction.IsolationLevels;
@@ -27,9 +26,7 @@
2726
import org.junit.AfterClass;
2827
import org.junit.Before;
2928
import org.junit.BeforeClass;
30-
import org.junit.Rule;
3129
import org.junit.Test;
32-
import org.junit.rules.Timeout;
3330

3431
public class DeadLockTest {
3532

@@ -43,9 +40,6 @@ public static void afterClass() {
4340
System.setProperty("org.eclipse.rdf4j.repository.debug", "false");
4441
}
4542

46-
@Rule
47-
public Timeout timeout = Timeout.millis(TimeUnit.MINUTES.toMillis(1));
48-
4943
private Repository repo;
5044

5145
private RepositoryConnection a;

testsuites/repository/src/main/java/org/eclipse/rdf4j/testsuite/repository/optimistic/DeleteInsertTest.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212

1313
import static org.junit.Assert.assertTrue;
1414

15-
import java.util.concurrent.TimeUnit;
16-
1715
import org.eclipse.rdf4j.common.io.IOUtil;
1816
import org.eclipse.rdf4j.common.transaction.IsolationLevel;
1917
import org.eclipse.rdf4j.common.transaction.IsolationLevels;
@@ -25,9 +23,7 @@
2523
import org.junit.AfterClass;
2624
import org.junit.Before;
2725
import org.junit.BeforeClass;
28-
import org.junit.Rule;
2926
import org.junit.Test;
30-
import org.junit.rules.Timeout;
3127

3228
/**
3329
* Test that a complex delete-insert SPARQL query gets correctly executed.
@@ -45,9 +41,6 @@ public static void afterClass() {
4541
System.setProperty("org.eclipse.rdf4j.repository.debug", "false");
4642
}
4743

48-
@Rule
49-
public Timeout timeout = Timeout.millis(TimeUnit.MINUTES.toMillis(1));
50-
5144
private Repository repo;
5245

5346
private final String NS = "http://example.org/";

testsuites/repository/src/main/java/org/eclipse/rdf4j/testsuite/repository/optimistic/IsolationLevelTest.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@
3535
import org.junit.AfterClass;
3636
import org.junit.Before;
3737
import org.junit.BeforeClass;
38-
import org.junit.Rule;
3938
import org.junit.Test;
40-
import org.junit.rules.Timeout;
4139
import org.slf4j.Logger;
4240
import org.slf4j.LoggerFactory;
4341

@@ -60,9 +58,6 @@ public static void afterClass() {
6058

6159
private final Logger logger = LoggerFactory.getLogger(IsolationLevelTest.class);
6260

63-
@Rule
64-
public Timeout timeout = Timeout.millis(TimeUnit.MINUTES.toMillis(1));
65-
6661
/*-----------*
6762
* Variables *
6863
*-----------*/

testsuites/repository/src/main/java/org/eclipse/rdf4j/testsuite/repository/optimistic/LinearTest.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
import java.util.ArrayList;
1616
import java.util.List;
17-
import java.util.concurrent.TimeUnit;
1817

1918
import org.eclipse.rdf4j.common.transaction.IsolationLevel;
2019
import org.eclipse.rdf4j.common.transaction.IsolationLevels;
@@ -36,9 +35,7 @@
3635
import org.junit.AfterClass;
3736
import org.junit.Before;
3837
import org.junit.BeforeClass;
39-
import org.junit.Rule;
4038
import org.junit.Test;
41-
import org.junit.rules.Timeout;
4239

4340
/**
4441
* Various tests on linear execution of updates.
@@ -56,9 +53,6 @@ public static void afterClass() {
5653
System.setProperty("org.eclipse.rdf4j.repository.debug", "false");
5754
}
5855

59-
@Rule
60-
public Timeout timeout = Timeout.millis(TimeUnit.MINUTES.toMillis(1));
61-
6256
private Repository repo;
6357

6458
private RepositoryConnection a;

testsuites/repository/src/main/java/org/eclipse/rdf4j/testsuite/repository/optimistic/ModificationTest.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
import static org.junit.Assert.assertFalse;
1414
import static org.junit.Assert.assertTrue;
1515

16-
import java.util.concurrent.TimeUnit;
17-
1816
import org.eclipse.rdf4j.common.transaction.IsolationLevel;
1917
import org.eclipse.rdf4j.common.transaction.IsolationLevels;
2018
import org.eclipse.rdf4j.model.IRI;
@@ -28,9 +26,7 @@
2826
import org.junit.AfterClass;
2927
import org.junit.Before;
3028
import org.junit.BeforeClass;
31-
import org.junit.Rule;
3229
import org.junit.Test;
33-
import org.junit.rules.Timeout;
3430

3531
public class ModificationTest {
3632

@@ -44,9 +40,6 @@ public static void afterClass() {
4440
System.setProperty("org.eclipse.rdf4j.repository.debug", "false");
4541
}
4642

47-
@Rule
48-
public Timeout timeout = Timeout.millis(TimeUnit.MINUTES.toMillis(1));
49-
5043
private Repository repo;
5144

5245
private RepositoryConnection con;

testsuites/repository/src/main/java/org/eclipse/rdf4j/testsuite/repository/optimistic/MonotonicTest.java

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
import java.util.ArrayList;
1616
import java.util.List;
17-
import java.util.concurrent.TimeUnit;
1817

1918
import org.eclipse.rdf4j.common.transaction.IsolationLevel;
2019
import org.eclipse.rdf4j.common.transaction.IsolationLevels;
@@ -33,9 +32,7 @@
3332
import org.junit.AfterClass;
3433
import org.junit.Before;
3534
import org.junit.BeforeClass;
36-
import org.junit.Rule;
3735
import org.junit.Test;
38-
import org.junit.rules.Timeout;
3936

4037
public class MonotonicTest {
4138

@@ -49,9 +46,6 @@ public static void afterClass() {
4946
System.setProperty("org.eclipse.rdf4j.repository.debug", "false");
5047
}
5148

52-
@Rule
53-
public Timeout timeout = Timeout.millis(TimeUnit.MINUTES.toMillis(1));
54-
5549
private Repository repo;
5650

5751
private RepositoryConnection a;
@@ -164,7 +158,7 @@ public void test_afterPattern() {
164158
b.add(REMBRANDT, RDF.TYPE, PAINTER);
165159
assertEquals(1, size(a, null, RDF.TYPE, PAINTER, false));
166160
a.commit();
167-
assertEquals(1, size(b, null, RDF.TYPE, PAINTER, false));
161+
assertEquals(2, size(b, null, RDF.TYPE, PAINTER, false));
168162
b.commit();
169163
}
170164

@@ -176,7 +170,7 @@ public void test_afterInsertDataPattern() {
176170
b.prepareUpdate(QueryLanguage.SPARQL, "INSERT DATA { <rembrandt> a <Painter> }", NS).execute();
177171
assertEquals(1, size(a, null, RDF.TYPE, PAINTER, false));
178172
a.commit();
179-
assertEquals(1, size(b, null, RDF.TYPE, PAINTER, false));
173+
assertEquals(2, size(b, null, RDF.TYPE, PAINTER, false));
180174
b.commit();
181175
}
182176

@@ -188,7 +182,7 @@ public void test_changedPattern() {
188182
b.add(REMBRANDT, RDF.TYPE, PAINTER);
189183
assertEquals(1, size(b, null, RDF.TYPE, PAINTER, false));
190184
a.commit();
191-
assertEquals(1, size(b, null, RDF.TYPE, PAINTER, false));
185+
assertEquals(2, size(b, null, RDF.TYPE, PAINTER, false));
192186
b.commit();
193187
}
194188

@@ -291,7 +285,7 @@ public void test_changedQuery() {
291285
b.add((Resource) painting, RDF.TYPE, PAINTING);
292286
}
293287
a.commit();
294-
assertEquals(3, size(b, null, PAINTS, null, false));
288+
assertEquals(5, size(b, null, PAINTS, null, false));
295289
b.commit();
296290
assertEquals(3, size(a, null, RDF.TYPE, PAINTING, false));
297291
}
@@ -311,7 +305,7 @@ public void test_changedInsert() {
311305
b.prepareUpdate(QueryLanguage.SPARQL,
312306
"INSERT { ?painting a <Painting> }\n" + "WHERE { [a <Painter>] <paints> ?painting }", NS).execute();
313307
a.commit();
314-
assertEquals(3, size(b, null, PAINTS, null, false));
308+
assertEquals(5, size(b, null, PAINTS, null, false));
315309
b.commit();
316310
assertEquals(3, size(a, null, RDF.TYPE, PAINTING, false));
317311
}
@@ -424,7 +418,7 @@ public void test_changedOptionalQuery() {
424418
}
425419
}
426420
a.commit();
427-
assertEquals(3, size(b, null, PAINTS, null, false));
421+
assertEquals(5, size(b, null, PAINTS, null, false));
428422
b.commit();
429423
assertEquals(10, size(a, null, null, null, false));
430424
}
@@ -444,7 +438,7 @@ public void test_changedOptionalInsert() {
444438
b.prepareUpdate(QueryLanguage.SPARQL, "INSERT { ?painting a <Painting> }\n" + "WHERE { ?painter a <Painter> "
445439
+ "OPTIONAL { ?painter <paints> ?painting } }", NS).execute();
446440
a.commit();
447-
assertEquals(3, size(b, null, PAINTS, null, false));
441+
assertEquals(5, size(b, null, PAINTS, null, false));
448442
b.commit();
449443
assertEquals(10, size(a, null, null, null, false));
450444
}
@@ -726,7 +720,7 @@ public void test_changedRangeQuery() {
726720
a.add(REMBRANDT, PAINTS, BELSHAZZAR);
727721
a.add(BELSHAZZAR, YEAR, lf.createLiteral(1635));
728722
a.commit();
729-
assertEquals(5, size(b, REMBRANDT, PAINTS, null, false));
723+
assertEquals(6, size(b, REMBRANDT, PAINTS, null, false));
730724
b.commit();
731725
assertEquals(16, size(a, null, null, null, false));
732726
}
@@ -754,7 +748,7 @@ public void test_changedRangeInsert() {
754748
a.add(REMBRANDT, PAINTS, BELSHAZZAR);
755749
a.add(BELSHAZZAR, YEAR, lf.createLiteral(1635));
756750
a.commit();
757-
assertEquals(5, size(b, REMBRANDT, PAINTS, null, false));
751+
assertEquals(6, size(b, REMBRANDT, PAINTS, null, false));
758752
b.commit();
759753
assertEquals(16, size(a, null, null, null, false));
760754
}

0 commit comments

Comments
 (0)