@@ -513,23 +513,23 @@ func TestPush_QuorumError(t *testing.T) {
513
513
514
514
d := dists [0 ]
515
515
516
- // Using 489 just to make sure we are not hitting the &limits
516
+ // Using 429 just to make sure we are not hitting the &limits
517
517
// Simulating 2 4xx and 1 5xx -> Should return 4xx
518
- ingesters [0 ].failResp .Store (httpgrpc .Errorf (489 , "Throttling" ))
518
+ ingesters [0 ].failResp .Store (httpgrpc .Errorf (429 , "Throttling" ))
519
519
ingesters [1 ].failResp .Store (httpgrpc .Errorf (500 , "InternalServerError" ))
520
- ingesters [2 ].failResp .Store (httpgrpc .Errorf (489 , "Throttling" ))
520
+ ingesters [2 ].failResp .Store (httpgrpc .Errorf (429 , "Throttling" ))
521
521
522
522
for i := 0 ; i < 1000 ; i ++ {
523
523
request := makeWriteRequest (0 , 30 , 20 )
524
524
_ , err := d .Push (ctx , request )
525
525
status , ok := status .FromError (err )
526
526
require .True (t , ok )
527
- require .Equal (t , codes .Code (489 ), status .Code ())
527
+ require .Equal (t , codes .Code (429 ), status .Code ())
528
528
}
529
529
530
530
// Simulating 2 5xx and 1 4xx -> Should return 5xx
531
531
ingesters [0 ].failResp .Store (httpgrpc .Errorf (500 , "InternalServerError" ))
532
- ingesters [1 ].failResp .Store (httpgrpc .Errorf (489 , "Throttling" ))
532
+ ingesters [1 ].failResp .Store (httpgrpc .Errorf (429 , "Throttling" ))
533
533
ingesters [2 ].failResp .Store (httpgrpc .Errorf (500 , "InternalServerError" ))
534
534
535
535
for i := 0 ; i < 10000 ; i ++ {
@@ -542,15 +542,15 @@ func TestPush_QuorumError(t *testing.T) {
542
542
543
543
// Simulating 2 different errors and 1 success -> This case we may return any of the errors
544
544
ingesters [0 ].failResp .Store (httpgrpc .Errorf (500 , "InternalServerError" ))
545
- ingesters [1 ].failResp .Store (httpgrpc .Errorf (489 , "Throttling" ))
545
+ ingesters [1 ].failResp .Store (httpgrpc .Errorf (429 , "Throttling" ))
546
546
ingesters [2 ].happy .Store (true )
547
547
548
548
for i := 0 ; i < 1000 ; i ++ {
549
549
request := makeWriteRequest (0 , 30 , 20 )
550
550
_ , err := d .Push (ctx , request )
551
551
status , ok := status .FromError (err )
552
552
require .True (t , ok )
553
- require .True (t , status .Code () == 489 || status .Code () == 500 )
553
+ require .True (t , status .Code () == 429 || status .Code () == 500 )
554
554
}
555
555
556
556
// Simulating 1 error -> Should return 2xx
@@ -581,7 +581,7 @@ func TestPush_QuorumError(t *testing.T) {
581
581
require .NoError (t , err )
582
582
583
583
// Give time to the ring get updated with the KV value
584
- time .Sleep (5 * time .Second )
584
+ time .Sleep (time .Second )
585
585
586
586
for i := 0 ; i < 1000 ; i ++ {
587
587
request := makeWriteRequest (0 , 30 , 20 )
0 commit comments