@@ -842,14 +842,14 @@ public function testSpatialIndex(): void
842842 $ database ->deleteCollection ($ collNullIndex );
843843 }
844844
845- $ collUpdateNull = 'spatial_idx_update_null_ ' . uniqid () ;
845+ $ collUpdateNull = 'spatial_idx_req ' ;
846846 try {
847847 $ database ->createCollection ($ collUpdateNull );
848848
849849 $ database ->createAttribute ($ collUpdateNull , 'loc ' , Database::VAR_POINT , 0 , false );
850850 if (!$ nullSupported ) {
851851 try {
852- $ database ->createIndex ($ collUpdateNull , 'idx_loc ' , Database::INDEX_SPATIAL , ['loc ' ]);
852+ $ database ->createIndex ($ collUpdateNull , 'idx_loc_required ' , Database::INDEX_SPATIAL , ['loc ' ]);
853853 $ this ->fail ('Expected exception when creating spatial index on NULL-able attribute ' );
854854 } catch (\Throwable $ e ) {
855855 $ this ->assertInstanceOf (Exception::class, $ e );
@@ -866,7 +866,7 @@ public function testSpatialIndex(): void
866866 }
867867
868868
869- $ collUpdateNull = 'spatial_idx_index_null_ ' . uniqid () ;
869+ $ collUpdateNull = 'spatial_idx_index_null_required_true ' ;
870870 try {
871871 $ database ->createCollection ($ collUpdateNull );
872872
@@ -884,7 +884,7 @@ public function testSpatialIndex(): void
884884
885885 $ database ->updateAttribute ($ collUpdateNull , 'loc ' , required: true );
886886
887- $ this ->assertTrue ($ database ->createIndex ($ collUpdateNull , 'idx_loc_req ' , Database::INDEX_SPATIAL , ['loc ' ]));
887+ $ this ->assertTrue ($ database ->createIndex ($ collUpdateNull , 'new index ' , Database::INDEX_SPATIAL , ['loc ' ]));
888888 } finally {
889889 $ database ->deleteCollection ($ collUpdateNull );
890890 }
0 commit comments