Fix timestamps in tests for queryable stores

This commit is contained in:
René Pfeuffer
2025-06-10 10:34:29 +02:00
parent 6165bd3d63
commit c262038d22

View File

@@ -63,11 +63,7 @@ public class SQLiteQueryableStoreFactory implements QueryableStoreFactory {
KeyGenerator keyGenerator) { KeyGenerator keyGenerator) {
this( this(
"jdbc:sqlite:" + contextProvider.resolve(Path.of("scm.db")), "jdbc:sqlite:" + contextProvider.resolve(Path.of("scm.db")),
objectMapper objectMapper,
.copy()
.configure(WRITE_DATES_AS_TIMESTAMPS, true)
.configure(WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS, false)
.configure(READ_DATE_TIMESTAMPS_AS_NANOSECONDS, false),
keyGenerator, keyGenerator,
pluginLoader.getExtensionProcessor().getQueryableTypes() pluginLoader.getExtensionProcessor().getQueryableTypes()
); );
@@ -86,7 +82,11 @@ public class SQLiteQueryableStoreFactory implements QueryableStoreFactory {
config config
); );
((SQLiteDataSource) dataSource).setUrl(connectionString); ((SQLiteDataSource) dataSource).setUrl(connectionString);
this.objectMapper = objectMapper; this.objectMapper = objectMapper
.copy()
.configure(WRITE_DATES_AS_TIMESTAMPS, true)
.configure(WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS, false)
.configure(READ_DATE_TIMESTAMPS_AS_NANOSECONDS, false);
this.keyGenerator = keyGenerator; this.keyGenerator = keyGenerator;
Connection connection = openDefaultConnection(); Connection connection = openDefaultConnection();
try { try {