From d7ae0b65a6865f941f393ace54c75ddaa6a01411 Mon Sep 17 00:00:00 2001 From: Zack Goodwin Date: Fri, 28 Jun 2024 11:54:56 -0400 Subject: [PATCH] PROC-1525: Improve filtering --- .../indeed/proctor/consumer/ProctorGroupsWriter.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/proctor-consumer/src/main/java/com/indeed/proctor/consumer/ProctorGroupsWriter.java b/proctor-consumer/src/main/java/com/indeed/proctor/consumer/ProctorGroupsWriter.java index 46b89c45..838c754f 100644 --- a/proctor-consumer/src/main/java/com/indeed/proctor/consumer/ProctorGroupsWriter.java +++ b/proctor-consumer/src/main/java/com/indeed/proctor/consumer/ProctorGroupsWriter.java @@ -1,6 +1,5 @@ package com.indeed.proctor.consumer; -import com.indeed.proctor.common.PayloadProperty; import com.indeed.proctor.common.ProctorResult; import com.indeed.proctor.common.model.Allocation; import com.indeed.proctor.common.model.ConsumableTestDefinition; @@ -15,7 +14,6 @@ import java.util.Optional; import java.util.Set; import java.util.function.BiPredicate; -import java.util.stream.Collectors; import static com.indeed.proctor.consumer.AbstractGroups.loggableAllocation; @@ -212,10 +210,10 @@ public ProctorGroupsWriter build() { // Do not log payload experiments which were overwritten if (consumableTestDefinition != null && consumableTestDefinition.getPayloadExperimentConfig() != null - && !proctorResult.getProperties().values().stream() - .map(PayloadProperty::getTestName) - .collect(Collectors.toSet()) - .contains(testName)) { + && proctorResult.getProperties().values().stream() + .noneMatch( + property -> + property.getTestName().equals(testName))) { return false; }