3737import org .junit .Before ;
3838import org .junit .BeforeClass ;
3939import org .junit .Test ;
40+ import org .junit .runner .RunWith ;
41+ import org .junit .runners .Parameterized ;
4042
4143import java .io .IOException ;
44+ import java .util .Arrays ;
45+ import java .util .Collection ;
4246
4347import static org .junit .Assert .assertEquals ;
4448
49+ @ RunWith (Parameterized .class )
4550public class TestCleanerWithReplication extends CompactorTest {
51+
4652 private Path cmRootDirectory ;
4753 private static MiniDFSCluster miniDFSCluster ;
4854 private final String dbName = "TestCleanerWithReplication" ;
4955
56+ private final boolean useMinHistoryWriteId ;
57+
58+ public TestCleanerWithReplication (boolean useMinHistoryWriteId ) {
59+ this .useMinHistoryWriteId = useMinHistoryWriteId ;
60+ }
61+
62+ @ Parameterized .Parameters (name = "useMinHistoryWriteId={0}" )
63+ public static Collection <Object []> parameters () {
64+ return Arrays .asList (
65+ new Object [][]{{true }, {false }});
66+ }
67+
5068 @ Before
5169 public void setup () throws Exception {
5270 HiveConf conf = new HiveConf ();
@@ -63,6 +81,11 @@ public void setup() throws Exception {
6381 ms .createDatabase (db );
6482 }
6583
84+ @ Override
85+ protected boolean useMinHistoryWriteId () {
86+ return useMinHistoryWriteId ;
87+ }
88+
6689 @ BeforeClass
6790 public static void classLevelSetup () throws IOException {
6891 Configuration hadoopConf = new Configuration ();
0 commit comments