Skip to content

Commit

Permalink
[FLINK-5016] [checkpointing] Split EventTimeWindowCheckpointingITCase
Browse files Browse the repository at this point in the history
Split this EventTimeWindowCheckpointingITCase up into multiple tests
in order to not run into the no output to stdout CI limit (currently
set to 5 minutes).

This closes apache#2933.
  • Loading branch information
uce committed Dec 4, 2016
1 parent 7fbd757 commit e288617
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,8 @@
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;

import java.io.IOException;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;

import static java.util.concurrent.TimeUnit.MILLISECONDS;
Expand All @@ -69,10 +65,13 @@
* This verifies that checkpointing works correctly with event time windows. This is more
* strict than {@link WindowCheckpointingITCase} because for event-time the contents
* of the emitted windows are deterministic.
*
* <p>Split into multiple test classes in order to decrease the runtime per backend
* and not run into CI infrastructure limits like no std output being emitted for
* I/O heavy variants.
*/
@SuppressWarnings("serial")
@RunWith(Parameterized.class)
public class EventTimeWindowCheckpointingITCase extends TestLogger {
public abstract class AbstractEventTimeWindowCheckpointingITCase extends TestLogger {

private static final int MAX_MEM_STATE_SIZE = 10 * 1024 * 1024;
private static final int PARALLELISM = 4;
Expand All @@ -85,10 +84,14 @@ public class EventTimeWindowCheckpointingITCase extends TestLogger {
private StateBackendEnum stateBackendEnum;
private AbstractStateBackend stateBackend;

public EventTimeWindowCheckpointingITCase(StateBackendEnum stateBackendEnum) {
AbstractEventTimeWindowCheckpointingITCase(StateBackendEnum stateBackendEnum) {
this.stateBackendEnum = stateBackendEnum;
}

enum StateBackendEnum {
MEM, FILE, ROCKSDB_FULLY_ASYNC
}

@BeforeClass
public static void startTestCluster() {
Configuration config = new Configuration();
Expand Down Expand Up @@ -764,27 +767,6 @@ public void restoreState(HashMap<Long, Integer> state) {
}
}

// ------------------------------------------------------------------------
// Parametrization for testing with different state backends
// ------------------------------------------------------------------------


@Parameterized.Parameters(name = "StateBackend = {0}")
@SuppressWarnings("unchecked,rawtypes")
public static Collection<Object[]> parameters(){
return Arrays.asList(new Object[][] {
{StateBackendEnum.MEM},
{StateBackendEnum.FILE},
{StateBackendEnum.ROCKSDB_FULLY_ASYNC}
}
);
}

private enum StateBackendEnum {
MEM, FILE, ROCKSDB_FULLY_ASYNC
}


// ------------------------------------------------------------------------
// Utilities
// ------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
* This verfies that checkpointing works correctly with event time windows.
*
* <p>
* This is a version of {@link EventTimeWindowCheckpointingITCase} for All-Windows.
* This is a version of {@link AbstractEventTimeWindowCheckpointingITCase} for All-Windows.
*/
@SuppressWarnings("serial")
public class EventTimeAllWindowCheckpointingITCase extends TestLogger {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.flink.test.checkpointing;

public class FileBackendEventTimeWindowCheckpointingITCase extends AbstractEventTimeWindowCheckpointingITCase {

public FileBackendEventTimeWindowCheckpointingITCase() {
super(StateBackendEnum.FILE);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.flink.test.checkpointing;

public class MemBackendEventTimeWindowCheckpointingITCase extends AbstractEventTimeWindowCheckpointingITCase {

public MemBackendEventTimeWindowCheckpointingITCase() {
super(StateBackendEnum.MEM);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.flink.test.checkpointing;

public class RocksDbBackendEventTimeWindowCheckpointingITCase extends AbstractEventTimeWindowCheckpointingITCase {

public RocksDbBackendEventTimeWindowCheckpointingITCase() {
super(StateBackendEnum.ROCKSDB_FULLY_ASYNC);
}
}

0 comments on commit e288617

Please sign in to comment.