XComp commented on a change in pull request #17972:
URL: https://github.com/apache/flink/pull/17972#discussion_r760128150
##########
File path:
flink-streaming-java/src/test/java/org/apache/flink/streaming/api/environment/CheckpointConfigFromConfigurationTest.java
##########
@@ -90,7 +93,33 @@
.whenSetFromFile("execution.checkpointing.unaligned",
"true")
.viaSetter(CheckpointConfig::enableUnalignedCheckpoints)
.getterVia(CheckpointConfig::isUnalignedCheckpointsEnabled)
- .nonDefaultValue(true));
+ .nonDefaultValue(true),
+ TestSpec.testValue(
+ (CheckpointStorage)
+ new FileSystemCheckpointStorage(
+
"file:///path/to/checkpoint/dir"))
+ .whenSetFromFile(
+
CheckpointingOptions.CHECKPOINTS_DIRECTORY.key(),
+ "file:///path/to/checkpoint/dir")
+ .viaSetter(CheckpointConfig::setCheckpointStorage)
+ .getterVia(CheckpointConfig::getCheckpointStorage)
+ .nonDefaultValue(
+ new
FileSystemCheckpointStorage("file:///path/to/checkpoint/dir"))
+ .customMatcher(
+ (actualValue, expectedValue) ->
+ assertThat(actualValue)
+ .hasSameClassAs(expectedValue)
+
.isOfAnyClassIn(FileSystemCheckpointStorage.class)
+ .asInstanceOf(
+
InstanceOfAssertFactories.type(
+
FileSystemCheckpointStorage.class))
Review comment:
I guess, you''re referring to `isOfAnyClassIn` vs `asInstanceOf`. The
former one is an actual assert checking that the set `CheckpointStorage` is of
type `FileSystemCheckpointStorage`. The latter one (`asInstanceOf`) performs
the casting so that further down in the method chain, we can access
`getCheckpointPath` which is only available in `FileSystemCheckpointStorage`
--
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]