@@ -840,7 +840,7 @@ func TestDistributor_PushInstanceLimits(t *testing.T) {
840
840
preInflight : 101 ,
841
841
inflightLimit : 101 ,
842
842
pushes : []testPush {
843
- {samples : 100 , expectedError : errTooManyInflightPushRequests },
843
+ {samples : 100 , expectedError : httpgrpc . Errorf ( http . StatusServiceUnavailable , "too many inflight push requests in distributor" ) },
844
844
},
845
845
},
846
846
"below inflight client limit" : {
@@ -893,7 +893,7 @@ func TestDistributor_PushInstanceLimits(t *testing.T) {
893
893
ingestionRateLimit : 1000 ,
894
894
895
895
pushes : []testPush {
896
- {samples : 100 , expectedError : errMaxSamplesPushRateLimitReached },
896
+ {samples : 100 , expectedError : httpgrpc . Errorf ( http . StatusServiceUnavailable , "distributor's samples push rate limit reached" ) },
897
897
{samples : 100 , expectedError : nil },
898
898
},
899
899
},
@@ -903,10 +903,10 @@ func TestDistributor_PushInstanceLimits(t *testing.T) {
903
903
ingestionRateLimit : 1000 ,
904
904
905
905
pushes : []testPush {
906
- {samples : 5000 , expectedError : nil }, // after push, rate = 500 + 0.2*(5000-500) = 1400
907
- {samples : 5000 , expectedError : errMaxSamplesPushRateLimitReached }, // after push, rate = 1400 + 0.2*(0 - 1400) = 1120
908
- {samples : 5000 , expectedError : errMaxSamplesPushRateLimitReached }, // after push, rate = 1120 + 0.2*(0 - 1120) = 896
909
- {samples : 5000 , expectedError : nil }, // 896 is below 1000, so this push succeeds, new rate = 896 + 0.2*(5000-896) = 1716.8
906
+ {samples : 5000 , expectedError : nil }, // after push, rate = 500 + 0.2*(5000-500) = 1400
907
+ {samples : 5000 , expectedError : httpgrpc . Errorf ( http . StatusServiceUnavailable , "distributor's samples push rate limit reached" ) }, // after push, rate = 1400 + 0.2*(0 - 1400) = 1120
908
+ {samples : 5000 , expectedError : httpgrpc . Errorf ( http . StatusServiceUnavailable , "distributor's samples push rate limit reached" ) }, // after push, rate = 1120 + 0.2*(0 - 1120) = 896
909
+ {samples : 5000 , expectedError : nil }, // 896 is below 1000, so this push succeeds, new rate = 896 + 0.2*(5000-896) = 1716.8
910
910
},
911
911
},
912
912
}
0 commit comments