mirror of
https://github.com/google/nomulus.git
synced 2025-05-28 15:11:26 +02:00
Increment the clock in expand recurring billings events test
Also adds some clarity on when to use the non-incrementing version. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=143037508
This commit is contained in:
parent
48a1bacbb0
commit
be523f7ce2
4 changed files with 86 additions and 64 deletions
|
@ -158,6 +158,12 @@ public abstract class MapreduceTestCase<T> extends ShardableTestCase {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes tasks in the mapreduce queue until all are finished.
|
||||
*
|
||||
* <p>If you are mocking a clock in your tests, use the
|
||||
* {@link #executeTasksUntilEmpty(String, FakeClock)} version instead.
|
||||
*/
|
||||
protected void executeTasksUntilEmpty(String queueName) throws Exception {
|
||||
executeTasksUntilEmpty(queueName, null);
|
||||
}
|
||||
|
@ -168,8 +174,8 @@ public abstract class MapreduceTestCase<T> extends ShardableTestCase {
|
|||
* <p>Incrementing the clock between tasks is important if tasks have transactions inside the
|
||||
* mapper or reducer, which don't have access to the fake clock.
|
||||
*/
|
||||
protected void
|
||||
executeTasksUntilEmpty(String queueName, @Nullable FakeClock clock) throws Exception {
|
||||
protected void executeTasksUntilEmpty(String queueName, @Nullable FakeClock clock)
|
||||
throws Exception {
|
||||
while (true) {
|
||||
ofy().clearSessionCache();
|
||||
// We have to re-acquire task list every time, because local implementation returns a copy.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue