Myasuka commented on a change in pull request #17833:
URL: https://github.com/apache/flink/pull/17833#discussion_r774361782
##########
File path:
flink-state-backends/flink-statebackend-rocksdb/src/test/java/org/apache/flink/contrib/streaming/state/RocksDBStateBackendConfigTest.java
##########
@@ -97,6 +97,18 @@ public void testDefaultsInSync() throws Exception {
assertEquals(defaultIncremental,
backend.isIncrementalCheckpointsEnabled());
}
+ @Test
+ public void testDefaultDbLogDir() throws Exception {
+ final EmbeddedRocksDBStateBackend backend = new
EmbeddedRocksDBStateBackend();
+ final File logFile = File.createTempFile(getClass().getSimpleName() +
"-", ".log");
+ // set the environment variable 'log.file' with the Flink log file
location
+ System.setProperty("log.file", logFile.getPath());
+ assertEquals(
+ logFile.getParent(),
+
backend.createOptionsAndResourceContainer().getDbOptions().dbLogDir());
Review comment:
The created resouce container is native objects and we must ensure to
close the `RocksDBResourceContainer` in the end of the test to avoid unexpected
exception.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]