package de.juplo.kafka.chat.backend;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.BeforeEach;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
+import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestPropertySource;
import java.io.IOException;
"chat.backend.inmemory.sharding-strategy=none",
"chat.backend.inmemory.storage-strategy=files",
"chat.backend.inmemory.storage-directory=target/files" })
+@ContextConfiguration(classes = InMemoryWithFilesStorageIT.TestConfig.class)
@Slf4j
public class InMemoryWithFilesStorageIT extends AbstractInMemoryStorageIT
{
Files.delete(path);
}
}
+
+
+ static class TestConfig
+ {
+ @Bean
+ ObjectMapper objectMapper()
+ {
+ ObjectMapper objectMapper = new ObjectMapper();
+ objectMapper.registerModule(new JavaTimeModule());
+ objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
+ return objectMapper;
+ }
+ }
}