@@ -419,10 +419,12 @@ public void testFormatWithInitialVotersFailsWithOlderKraftVersion() throws Excep
419419 formatter1 .formatter .setInitialControllers (DynamicVoters .
420420 parse ("1@localhost:8020:4znU-ou9Taa06bmEJxsjnw" ));
421421 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+ );
426428 }
427429 }
428430
@@ -433,10 +435,12 @@ public void testFormatWithoutInitialVotersFailsWithNewerKraftVersion() throws Ex
433435 formatter1 .formatter .setFeatureLevel ("kraft.version" , (short ) 1 );
434436 formatter1 .formatter .setUnstableFeatureVersionsEnabled (true );
435437 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+ );
440444 }
441445 }
442446
@@ -526,10 +530,12 @@ public void testFormatWithoutNoInitialControllersFailsWithNewerKraftVersion() th
526530 formatter1 .formatter .setUnstableFeatureVersionsEnabled (true );
527531 formatter1 .formatter .setNoInitialControllersFlag (false );
528532 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+ );
533539 }
534540 }
535541
@@ -541,10 +547,12 @@ public void testFormatWithNoInitialControllersFailsWithOlderKraftVersion() throw
541547 formatter1 .formatter .setUnstableFeatureVersionsEnabled (true );
542548 formatter1 .formatter .setNoInitialControllersFlag (true );
543549 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+ );
548556 }
549557 }
550558}
0 commit comments