Not using RunTestWithMatchingBehavior because I want to pass different expected drain times for different configurations
()
| 57 | |
| 58 | // Not using RunTestWithMatchingBehavior because I want to pass different expected drain times for different configurations |
| 59 | func (s *TaskQueueSuite) TestTaskQueueRateLimit() { |
| 60 | s.runTaskQueueRateLimitTest(1, 1, 12*time.Second, true) // ~0.75s avg |
| 61 | s.runTaskQueueRateLimitTest(1, 1, 12*time.Second, false) // ~1.1s avg |
| 62 | |
| 63 | // Testing multiple partitions with insufficient pollers is too flaky, because token recycling |
| 64 | // depends on a process being available to accept the token, so I'm not testing it |
| 65 | s.runTaskQueueRateLimitTest(4, 8, 24*time.Second, true) // ~1.6s avg |
| 66 | s.runTaskQueueRateLimitTest(4, 8, 24*time.Second, false) // ~6s avg |
| 67 | } |
| 68 | |
| 69 | func (s *TaskQueueSuite) runTaskQueueRateLimitTest(nPartitions, nWorkers int, timeToDrain time.Duration, useNewMatching bool) { |
| 70 | s.Run(s.testTaskQueueRateLimitName(nPartitions, nWorkers, useNewMatching), func(s *TaskQueueSuite) { |
nothing calls this directly
no test coverage detected