blob: e82e11e9b36914b88c56486efe80338274c5463e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.provision.provisioning;
import com.yahoo.vespa.hosted.provision.node.Agent;
import org.junit.jupiter.api.Test;
import static com.yahoo.vespa.hosted.provision.provisioning.ProvisioningThrottler.throttle;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
/**
* @author mpolden
*/
class ProvisioningThrottlerTest {
@Test
void throttling() {
Agent agent = Agent.system;
assertFalse(throttle(239, 10, agent));
assertFalse(throttle(240, 10, agent));
assertTrue(throttle(241, 10, agent));
}
}
|