rkhachatryan commented on a change in pull request #19081:
URL: https://github.com/apache/flink/pull/19081#discussion_r827001280
##########
File path:
flink-tests/src/test/java/org/apache/flink/runtime/operators/lifecycle/BoundedSourceITCase.java
##########
@@ -46,10 +56,42 @@
* same.
*/
@RunWith(Parameterized.class)
-public class BoundedSourceITCase extends AbstractTestBase {
+public class BoundedSourceITCase extends TestBaseUtils {
+
+ // Manual managing of folder rather than ClassRule since folder should be
created before
+ // MiniCluster.
+ private static final TemporaryFolder TEMPORARY_FOLDER = new
TemporaryFolder();
Review comment:
Alternatively, miniCluster rule can be on the test lavel, rather than
class (i.e. `@Rule` instead of `@ClassRule` for `MINI_CLUSTER_RESOURCE`).
In my local setup, it increases `BoundedSourceITCase` running time from 21s
only to 22s, which I think is acceptable.
##########
File path:
flink-tests/src/test/java/org/apache/flink/runtime/operators/lifecycle/BoundedSourceITCase.java
##########
@@ -46,10 +56,42 @@
* same.
*/
@RunWith(Parameterized.class)
-public class BoundedSourceITCase extends AbstractTestBase {
+public class BoundedSourceITCase extends TestBaseUtils {
+
+ // Manual managing of folder rather than ClassRule since folder should be
created before
+ // MiniCluster.
+ private static final TemporaryFolder TEMPORARY_FOLDER = new
TemporaryFolder();
+
+ @ClassRule
+ public static final MiniClusterWithClientResource MINI_CLUSTER_RESOURCE =
+ new MiniClusterWithClientResource(
+ new MiniClusterResourceConfiguration.Builder()
+ .setConfiguration(configuration())
+ .setNumberTaskManagers(1)
+ .setNumberSlotsPerTaskManager(4)
+ .build());
@Rule public final SharedObjects sharedObjects = SharedObjects.create();
+ private static Configuration configuration() {
+ Configuration conf = new Configuration();
+ // Force using filesystem since memory doesn't work correct with
StateChangeLog.
+ conf.set(STATE_CHANGE_LOG_STORAGE, "filesystem");
+ try {
+ TEMPORARY_FOLDER.create();
+ conf.set(BASE_PATH,
TEMPORARY_FOLDER.newFolder().getAbsolutePath());
Review comment:
nit: there is a shortcut method for doing this:
`FsStateChangelogStorageFactory.configure`.
--
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]