@@ -51,18 +51,18 @@ Y_UNIT_TEST_SUITE(GroupLayoutSanitizer) {
5151 return proto;
5252 }
5353
54- void Test (TBlobStorageGroupType groupType, ui32 dcs, ui32 racks) {
54+ void Test (TBlobStorageGroupType groupType, ui32 dcs, ui32 racks, ui32 units ) {
5555 std::vector<TNodeLocation> locations;
5656
57- MakeLocations (locations, dcs, racks, 1 , LocationGenerator);
57+ MakeLocations (locations, dcs, racks, units , LocationGenerator);
5858 std::unique_ptr<TEnvironmentSetup> env;
5959
6060 CreateEnv (env, locations, groupType);
6161
6262
6363 // Assure that sanitizer doesn't send request to initially allocated groups
64- env->UpdateSettings (true , false , true );
6564 env->Runtime ->FilterFunction = CatchSanitizeRequests;
65+ env->UpdateSettings (true , false , true );
6666 env->Sim (TDuration::Minutes (3 ));
6767 env->UpdateSettings (false , false , false );
6868
@@ -71,14 +71,15 @@ Y_UNIT_TEST_SUITE(GroupLayoutSanitizer) {
7171 TString error;
7272 auto cfg = env->FetchBaseConfig ();
7373 UNIT_ASSERT_C (CheckBaseConfigLayout (geom, cfg, true , error), error);
74- env->Cleanup ();
7574
7675 // Shuffle node locayion, assure that layout error occured
77- std::random_shuffle (locations.begin (), locations.end ());
78- env->Initialize ();
79- env->Sim (TDuration::Seconds (100 ));
80- cfg = env->FetchBaseConfig ();
81- CheckBaseConfigLayout (geom, cfg, true , error);
76+ do {
77+ env->Cleanup ();
78+ std::random_shuffle (locations.begin (), locations.end ());
79+ env->Initialize ();
80+ env->Sim (TDuration::Seconds (100 ));
81+ cfg = env->FetchBaseConfig ();
82+ } while (CheckBaseConfigLayout (geom, cfg, true , error));
8283 Cerr << error << Endl;
8384
8485 // Sanitize groups
@@ -96,15 +97,15 @@ Y_UNIT_TEST_SUITE(GroupLayoutSanitizer) {
9697 }
9798
9899 Y_UNIT_TEST (Test3dc) {
99- Test (TBlobStorageGroupType::ErasureMirror3dc, 3 , 5 );
100+ Test (TBlobStorageGroupType::ErasureMirror3dc, 3 , 5 , 1 );
100101 }
101102
102103 Y_UNIT_TEST (TestBlock4Plus2) {
103- Test (TBlobStorageGroupType::Erasure4Plus2Block, 1 , 12 );
104+ Test (TBlobStorageGroupType::Erasure4Plus2Block, 1 , 10 , 2 );
104105 }
105106
106107 Y_UNIT_TEST (TestMirror3of4) {
107- Test (TBlobStorageGroupType::ErasureMirror3of4, 1 , 12 );
108+ Test (TBlobStorageGroupType::ErasureMirror3of4, 1 , 10 , 2 );
108109 }
109110
110111 TString PrintGroups (TBlobStorageGroupType groupType, const NKikimrBlobStorage::TBaseConfig& cfg,
0 commit comments