Ejemplo n.º 1
0
 @Test
 public void testCompatible() {
   prepare("0.4.0", "0.4.0");
   CompatibilityCheckStage stage = new CompatibilityCheckStage();
   StageContext context = new StageContext();
   stage.init(context);
   stage.preProcess();
   try {
     stage.process(event);
   } catch (Exception e) {
     Assert.fail("Should not fail since versions are compatible", e);
   }
   stage.postProcess();
 }
Ejemplo n.º 2
0
 @Test
 public void testNullControllerVersion() {
   prepare(null, "0.4.0");
   CompatibilityCheckStage stage = new CompatibilityCheckStage();
   StageContext context = new StageContext();
   stage.init(context);
   stage.preProcess();
   try {
     stage.process(event);
   } catch (Exception e) {
     Assert.fail(
         "Should not fail since compatibility check will be skipped if controller version is null");
   }
   stage.postProcess();
 }
Ejemplo n.º 3
0
 @Test
 public void testIncompatible() {
   prepare("0.6.1-incubating-SNAPSHOT", "0.3.4", "0.4");
   CompatibilityCheckStage stage = new CompatibilityCheckStage();
   StageContext context = new StageContext();
   stage.init(context);
   stage.preProcess();
   try {
     stage.process(event);
     Assert.fail(
         "Should fail since participant version is less than the minimum participant version supported by controller");
   } catch (Exception e) {
     // OK
   }
   stage.postProcess();
 }