1212import static org .openmetadata .service .Entity .PIPELINE ;
1313import static org .openmetadata .service .Entity .TEAM ;
1414import static org .openmetadata .service .Entity .TEST_CASE ;
15+ import static org .openmetadata .service .Entity .TEST_SUITE ;
1516import static org .openmetadata .service .Entity .THREAD ;
1617import static org .openmetadata .service .Entity .USER ;
1718
3031import org .openmetadata .schema .entity .services .ingestionPipelines .PipelineStatusType ;
3132import org .openmetadata .schema .entity .teams .Team ;
3233import org .openmetadata .schema .entity .teams .User ;
34+ import org .openmetadata .schema .tests .ResultSummary ;
3335import org .openmetadata .schema .tests .TestCase ;
3436import org .openmetadata .schema .tests .TestSuite ;
3537import org .openmetadata .schema .tests .type .TestCaseResult ;
@@ -219,7 +221,8 @@ public boolean matchTestResult(List<String> testResults) {
219221 if (changeEvent == null || changeEvent .getChangeDescription () == null ) {
220222 return false ;
221223 }
222- if (!changeEvent .getEntityType ().equals (TEST_CASE )) {
224+ if (!changeEvent .getEntityType ().equals (TEST_CASE )
225+ && !changeEvent .getEntityType ().equals (TEST_SUITE )) {
223226 // in case the entity is not test case return since the filter doesn't apply
224227 return true ;
225228 }
@@ -241,6 +244,19 @@ public boolean matchTestResult(List<String> testResults) {
241244 }
242245 }
243246 }
247+
248+ if (fieldChange .getName ().equals ("testCaseResultSummary" )
249+ && fieldChange .getNewValue () != null ) {
250+ List <ResultSummary > resultSummaries =
251+ JsonUtils .readOrConvertValues (fieldChange .getNewValue (), ResultSummary .class );
252+
253+ for (ResultSummary resultSummary : resultSummaries ) {
254+ if (!nullOrEmpty (resultSummary .getStatus ())
255+ && testResults .contains (resultSummary .getStatus ().value ())) {
256+ return true ;
257+ }
258+ }
259+ }
244260 }
245261 return false ;
246262 }
0 commit comments