Skip to content

Commit

Permalink
Re-enable one more disabled integration test.
Browse files Browse the repository at this point in the history
  • Loading branch information
ledsoft committed Jun 12, 2024
1 parent 971c655 commit 139acde
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import cz.cvut.kbss.jopa.test.environment.Rdf4jDataAccessor;
import cz.cvut.kbss.jopa.test.environment.Rdf4jPersistenceFactory;
import cz.cvut.kbss.jopa.test.runner.UpdateOperationsRunner;
import org.junit.jupiter.api.Disabled;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand All @@ -31,11 +30,4 @@ public class UpdateOperationsTest extends UpdateOperationsRunner {
public UpdateOperationsTest() {
super(LOG, new Rdf4jPersistenceFactory(), new Rdf4jDataAccessor());
}

// TODO Re-enable after new transactional mechanism is implemented
@Disabled
@Override
public void concurrentTransactionsLeaveDataInConsistentState() {
super.concurrentTransactionsLeaveDataInConsistentState();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -155,31 +155,26 @@ public static Map<URI, Set<Object>> createTypedProperties(int size) {

private static Object generateRandomPropertyValue(int valueIndex, int propertyIndex) {
final int random = randomInt(10);
switch (random) {
case 0: // boolean
return valueIndex % 2 == 0;
case 1: // int
return valueIndex;
case 2: // long
return System.currentTimeMillis();
case 3: //double
return ((double) propertyIndex + 1) / (valueIndex + 1);
case 4: // datetime
return switch (random) {
case 0 -> // boolean
valueIndex % 2 == 0;
case 1 -> // int
valueIndex;
case 2 -> // long
System.currentTimeMillis();
case 3 -> //double
((double) propertyIndex + 1) / (valueIndex + 1);
case 4 -> // datetime
// Generate date rounded to milliseconds to prevent issues with time rounding
return OffsetDateTime.now().truncatedTo(ChronoUnit.MILLIS);
case 5:
return OffsetTime.now().truncatedTo(ChronoUnit.MILLIS);
case 6:
return LocalDate.now();
case 7: // String
return "TypedProperty_" + propertyIndex + "Value_" + valueIndex;
case 8:
return BigInteger.valueOf(valueIndex);
case 9:
return BigDecimal.valueOf(Math.PI);
default:
throw new IllegalArgumentException();
}
OffsetDateTime.now().truncatedTo(ChronoUnit.MILLIS);
case 5 -> OffsetTime.now().truncatedTo(ChronoUnit.MILLIS);
case 6 -> LocalDate.now();
case 7 -> // String
"TypedProperty_" + propertyIndex + "Value_" + valueIndex;
case 8 -> BigInteger.valueOf(valueIndex);
case 9 -> BigDecimal.valueOf(Math.PI);
default -> throw new IllegalArgumentException();
};
}

private static void generateInstances(Collection<OWLClassA> col, String uriBase, int size) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
import cz.cvut.kbss.jopa.vocabulary.RDF;
import cz.cvut.kbss.ontodriver.ReloadableDataSource;
import cz.cvut.kbss.ontodriver.config.OntoDriverProperties;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;

Expand Down

0 comments on commit 139acde

Please sign in to comment.