change watchCheck to coinflip; rename noDestroy
This commit is contained in:
parent
f049c3d74d
commit
ef17634174
|
@ -1696,11 +1696,11 @@ struct TenantManagementWorkload : TestWorkload {
|
|||
|
||||
// Run a random sequence of tenant management operations for the duration of the test
|
||||
while (now() < start + self->testDuration) {
|
||||
state int operation = deterministicRandom()->randomInt(0, 9);
|
||||
state int operation = deterministicRandom()->randomInt(0, 8);
|
||||
if (operation == 0) {
|
||||
wait(createTenant(self));
|
||||
} else if (operation == 1) {
|
||||
wait(deleteTenant(self, false));
|
||||
wait(deleteTenant(self, deterministicRandom()->coinflip()));
|
||||
} else if (operation == 2) {
|
||||
wait(getTenant(self));
|
||||
} else if (operation == 3) {
|
||||
|
@ -1713,8 +1713,6 @@ struct TenantManagementWorkload : TestWorkload {
|
|||
wait(getTenantGroup(self));
|
||||
} else if (operation == 7) {
|
||||
wait(listTenantGroups(self));
|
||||
} else if (operation == 8) {
|
||||
wait(deleteTenant(self, true));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -575,20 +575,20 @@ public:
|
|||
void sendError(K const& begin, K const& end, Error const& e) {
|
||||
if (begin >= end)
|
||||
return;
|
||||
std::vector<Promise<Void>> noDestroy = swapRangePromises(items.lower_bound(begin), items.lower_bound(end));
|
||||
sendError(noDestroy, e);
|
||||
std::vector<Promise<Void>> ps = swapRangePromises(items.lower_bound(begin), items.lower_bound(end));
|
||||
sendError(ps, e);
|
||||
}
|
||||
|
||||
void triggerAll() {
|
||||
std::vector<Promise<Void>> noDestroy = swapRangePromises(items.begin(), items.end());
|
||||
send(noDestroy);
|
||||
std::vector<Promise<Void>> ps = swapRangePromises(items.begin(), items.end());
|
||||
send(ps);
|
||||
}
|
||||
|
||||
void triggerRange(K const& begin, K const& end) {
|
||||
if (begin >= end)
|
||||
return;
|
||||
std::vector<Promise<Void>> noDestroy = swapRangePromises(items.lower_bound(begin), items.lower_bound(end));
|
||||
send(noDestroy);
|
||||
std::vector<Promise<Void>> ps = swapRangePromises(items.lower_bound(begin), items.lower_bound(end));
|
||||
send(ps);
|
||||
}
|
||||
|
||||
void trigger(K const& key) {
|
||||
|
|
Loading…
Reference in New Issue