@@ -513,23 +513,23 @@ func TestPush_QuorumError(t *testing.T) {
513513
514514 d := dists [0 ]
515515
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
517517 // 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" ))
519519 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" ))
521521
522522 for i := 0 ; i < 1000 ; i ++ {
523523 request := makeWriteRequest (0 , 30 , 20 )
524524 _ , err := d .Push (ctx , request )
525525 status , ok := status .FromError (err )
526526 require .True (t , ok )
527- require .Equal (t , codes .Code (489 ), status .Code ())
527+ require .Equal (t , codes .Code (429 ), status .Code ())
528528 }
529529
530530 // Simulating 2 5xx and 1 4xx -> Should return 5xx
531531 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" ))
533533 ingesters [2 ].failResp .Store (httpgrpc .Errorf (500 , "InternalServerError" ))
534534
535535 for i := 0 ; i < 10000 ; i ++ {
@@ -542,15 +542,15 @@ func TestPush_QuorumError(t *testing.T) {
542542
543543 // Simulating 2 different errors and 1 success -> This case we may return any of the errors
544544 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" ))
546546 ingesters [2 ].happy .Store (true )
547547
548548 for i := 0 ; i < 1000 ; i ++ {
549549 request := makeWriteRequest (0 , 30 , 20 )
550550 _ , err := d .Push (ctx , request )
551551 status , ok := status .FromError (err )
552552 require .True (t , ok )
553- require .True (t , status .Code () == 489 || status .Code () == 500 )
553+ require .True (t , status .Code () == 429 || status .Code () == 500 )
554554 }
555555
556556 // Simulating 1 error -> Should return 2xx
@@ -581,7 +581,7 @@ func TestPush_QuorumError(t *testing.T) {
581581 require .NoError (t , err )
582582
583583 // Give time to the ring get updated with the KV value
584- time .Sleep (5 * time .Second )
584+ time .Sleep (time .Second )
585585
586586 for i := 0 ; i < 1000 ; i ++ {
587587 request := makeWriteRequest (0 , 30 , 20 )
0 commit comments