@@ -55,6 +55,7 @@ public function testCreateShardingSchemaBalanced(): void {
55
55
/**
56
56
* Test rebalancing with RF=1 when adding new nodes - should NOT move shards
57
57
*/
58
+ // phpcs:ignore SlevomatCodingStandard.Complexity.Cognitive.ComplexityTooHigh
58
59
public function testRebalanceWithRf1AddingNodes (): void {
59
60
// Create original schema with RF=1: 6 shards on 2 nodes
60
61
$ originalNodes = new Set (['node1 ' , 'node2 ' ]);
@@ -98,7 +99,10 @@ public function testRebalanceWithRf1AddingNodes(): void {
98
99
$ this ->assertNotNull ($ newNodeRow , 'New node should be present in rebalanced schema ' );
99
100
100
101
// CRITICAL: New node should have NO shards (RF=1 prevents data movement)
101
- $ this ->assertTrue ($ newNodeRow ['shards ' ]->isEmpty (), 'New node should have no shards with RF=1 to prevent data loss ' );
102
+ $ this ->assertTrue (
103
+ $ newNodeRow ['shards ' ]->isEmpty (),
104
+ 'New node should have no shards with RF=1 to prevent data loss '
105
+ );
102
106
103
107
// CRITICAL: Existing nodes should keep their EXACT original shards (no movement)
104
108
foreach ($ originalSchema as $ originalRow ) {
@@ -113,7 +117,8 @@ public function testRebalanceWithRf1AddingNodes(): void {
113
117
$ this ->assertEquals (
114
118
$ originalRow ['shards ' ]->toArray (),
115
119
$ rebalancedRow ['shards ' ]->toArray (),
116
- "Node {$ originalRow ['node ' ]} should keep its EXACT original shards with RF=1 - moving shards would cause data loss! "
120
+ "Node {$ originalRow ['node ' ]} should keep its EXACT original "
121
+ . 'shards with RF=1 - moving shards would cause data loss! '
117
122
);
118
123
}
119
124
0 commit comments