From d6a63eae605b00c726941a50f8de0457ddc3a8b6 Mon Sep 17 00:00:00 2001 From: Mohit Yadav <105265192+mohityadav766@users.noreply.github.com> Date: Fri, 20 Dec 2024 14:39:02 +0530 Subject: [PATCH] Fix Failing test for glossary (#19151) --- .../events/EventSubscriptionResourceTest.java | 12 ++++++++ .../glossary/GlossaryResourceTest.java | 29 +++++++------------ 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/openmetadata-service/src/test/java/org/openmetadata/service/resources/events/EventSubscriptionResourceTest.java b/openmetadata-service/src/test/java/org/openmetadata/service/resources/events/EventSubscriptionResourceTest.java index eb5dfdf48331..d82e3e48cb5c 100644 --- a/openmetadata-service/src/test/java/org/openmetadata/service/resources/events/EventSubscriptionResourceTest.java +++ b/openmetadata-service/src/test/java/org/openmetadata/service/resources/events/EventSubscriptionResourceTest.java @@ -2289,4 +2289,16 @@ protected void assertFieldLists(List expectedList, List newRecords = listOf( ",g3,dsp0,dsc0,h1;h2;h3,,term0;http://term0,PII.Sensitive,,,Approved,\"\"\"glossaryTermTableCol1Cp:row_1_col1_Value,,\"\";\"\"glossaryTermTableCol3Cp:row_1_col1_Value,row_1_col2_Value,row_1_col3_Value|row_2_col1_Value,row_2_col2_Value,row_2_col3_Value\"\"\""); - Awaitility.await() - .atMost(Duration.ofMillis(120 * 1000L)) - .pollInterval(Duration.ofMillis(2000L)) - .ignoreExceptions() - .until( - () -> { - try { - testImportExport( - glossary.getName(), - GlossaryCsv.HEADERS, - createRecords, - updateRecords, - newRecords); - return true; - } catch (Exception e) { - // Return false to retry - return false; - } - }); + testImportExport( + glossary.getName(), GlossaryCsv.HEADERS, createRecords, updateRecords, newRecords); + + // Reset poll Interval to allow Status change from workflow + eventSubscriptionResourceTest.updateEventSubscriptionPollInterval("WorkflowEventConsumer", 10); } @Test