@@ -419,10 +419,12 @@ public void testFormatWithInitialVotersFailsWithOlderKraftVersion() throws Excep
419
419
formatter1 .formatter .setInitialControllers (DynamicVoters .
420
420
parse ("1@localhost:8020:4znU-ou9Taa06bmEJxsjnw" ));
421
421
assertTrue (formatter1 .formatter .hasDynamicQuorum ());
422
- assertEquals ("Cannot set kraft.version to 0 if KIP-853 configuration is present. " +
423
- "Try removing the --feature flag for kraft.version." ,
424
- assertThrows (FormatterException .class ,
425
- () -> formatter1 .formatter .run ()).getMessage ());
422
+ assertEquals (
423
+ "Cannot set kraft.version to 0 if one of the flags --standalone, --initial-controllers, or " +
424
+ "--no-initial-controllers is used. For dynamic controllers support, try removing the " +
425
+ "--feature flag for kraft.version." ,
426
+ assertThrows (FormatterException .class , () -> formatter1 .formatter .run ()).getMessage ()
427
+ );
426
428
}
427
429
}
428
430
@@ -433,10 +435,12 @@ public void testFormatWithoutInitialVotersFailsWithNewerKraftVersion() throws Ex
433
435
formatter1 .formatter .setFeatureLevel ("kraft.version" , (short ) 1 );
434
436
formatter1 .formatter .setUnstableFeatureVersionsEnabled (true );
435
437
assertFalse (formatter1 .formatter .hasDynamicQuorum ());
436
- assertEquals ("Cannot set kraft.version to 1 unless KIP-853 configuration is present. " +
437
- "Try removing the --feature flag for kraft.version." ,
438
- assertThrows (FormatterException .class ,
439
- () -> formatter1 .formatter .run ()).getMessage ());
438
+ assertEquals (
439
+ "Cannot set kraft.version to 1 unless one of the flags --standalone, --initial-controllers, or " +
440
+ "--no-initial-controllers is used. For dynamic controllers support, try using one of " +
441
+ "--standalone, --initial-controllers, or --no-initial-controllers." ,
442
+ assertThrows (FormatterException .class , () -> formatter1 .formatter .run ()).getMessage ()
443
+ );
440
444
}
441
445
}
442
446
@@ -526,10 +530,12 @@ public void testFormatWithoutNoInitialControllersFailsWithNewerKraftVersion() th
526
530
formatter1 .formatter .setUnstableFeatureVersionsEnabled (true );
527
531
formatter1 .formatter .setNoInitialControllersFlag (false );
528
532
assertFalse (formatter1 .formatter .hasDynamicQuorum ());
529
- assertEquals ("Cannot set kraft.version to 1 unless KIP-853 configuration is present. " +
530
- "Try removing the --feature flag for kraft.version." ,
531
- assertThrows (FormatterException .class ,
532
- formatter1 .formatter ::run ).getMessage ());
533
+ assertEquals (
534
+ "Cannot set kraft.version to 1 unless one of the flags --standalone, --initial-controllers, or " +
535
+ "--no-initial-controllers is used. For dynamic controllers support, try using one of " +
536
+ "--standalone, --initial-controllers, or --no-initial-controllers." ,
537
+ assertThrows (FormatterException .class , formatter1 .formatter ::run ).getMessage ()
538
+ );
533
539
}
534
540
}
535
541
@@ -541,10 +547,12 @@ public void testFormatWithNoInitialControllersFailsWithOlderKraftVersion() throw
541
547
formatter1 .formatter .setUnstableFeatureVersionsEnabled (true );
542
548
formatter1 .formatter .setNoInitialControllersFlag (true );
543
549
assertTrue (formatter1 .formatter .hasDynamicQuorum ());
544
- assertEquals ("Cannot set kraft.version to 0 if KIP-853 configuration is present. " +
545
- "Try removing the --feature flag for kraft.version." ,
546
- assertThrows (FormatterException .class ,
547
- formatter1 .formatter ::run ).getMessage ());
550
+ assertEquals (
551
+ "Cannot set kraft.version to 0 if one of the flags --standalone, --initial-controllers, or " +
552
+ "--no-initial-controllers is used. For dynamic controllers support, try removing the " +
553
+ "--feature flag for kraft.version." ,
554
+ assertThrows (FormatterException .class , formatter1 .formatter ::run ).getMessage ()
555
+ );
548
556
}
549
557
}
550
558
}
0 commit comments