Skip to content

Commit

Permalink
[FLINK-11904][tests]Improve MemoryStateBackendTest by using JUnit's P…
Browse files Browse the repository at this point in the history
…arameterized

This closes apache#7984.
  • Loading branch information
klion26 authored and StefanRRichter committed Mar 14, 2019
1 parent b6b4baf commit 6c7ddf3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 32 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,29 @@

import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;

import java.util.Arrays;
import java.util.List;

/**
* Tests for the {@link org.apache.flink.runtime.state.memory.MemoryStateBackend}.
*/
@RunWith(Parameterized.class)
public class MemoryStateBackendTest extends StateBackendTestBase<MemoryStateBackend> {

@Override
protected MemoryStateBackend getStateBackend() throws Exception {
return new MemoryStateBackend(useAsyncMode());
@Parameterized.Parameters(name = "useAsyncmode")
public static List<Boolean> modes() {
return Arrays.asList(true, false);
}

protected boolean useAsyncMode() {
return false;
@Parameterized.Parameter
public boolean useAsyncmode;

@Override
protected MemoryStateBackend getStateBackend() {
return new MemoryStateBackend(useAsyncmode);
}

@Override
Expand Down

0 comments on commit 6c7ddf3

Please sign in to comment.