fix(selfop): allow controlled manual collection in test
This commit is contained in:
+2
-1
@@ -90,7 +90,8 @@ public final class LingxingEgressGate {
|
||||
}
|
||||
private void check(EgressContext context) {
|
||||
if (properties.collectionMode() == CollectionMode.OFF) throw failure("EGRESS_OFF");
|
||||
if (properties.collectionMode() == CollectionMode.BUSINESS && !"production".equals(properties.environmentLabel()))
|
||||
if (properties.collectionMode() == CollectionMode.BUSINESS
|
||||
&& !("production".equals(properties.environmentLabel()) || "test".equals(properties.environmentLabel())))
|
||||
throw failure("BUSINESS_ENVIRONMENT_REJECTED");
|
||||
if (paused && (!recoverableRatePause || properties.collectionMode() != CollectionMode.BUSINESS
|
||||
|| cooldownUntil == null || clock.instant().isBefore(cooldownUntil))) throw failure("ACCOUNT_PAUSED");
|
||||
|
||||
Reference in New Issue
Block a user