update check for dcId

This commit is contained in:
Jon Fu 2019-10-14 15:03:04 -07:00
parent 0489f81c10
commit 373ac3026f
1 changed files with 2 additions and 2 deletions

View File

@ -164,8 +164,8 @@ struct MachineAttritionWorkload : TestWorkload {
TraceEvent("Assassination").detail("TargetDataCenter", killDcId);
for (const auto& worker : workers) {
// kill all matching dcId workers, except testers
if (worker.interf.locality.dcId() == killDcId &&
worker.processClass == ProcessClass::ClassType::TesterClass) {
if (worker.interf.locality.dcId().present() && worker.interf.locality.dcId() == killDcId &&
worker.processClass != ProcessClass::ClassType::TesterClass) {
worker.interf.clientInterface.reboot.send(rbReq);
}
}