FIx failing Maven CI Tests (#21975)

* Fix Glossary Test Failures

* Fix Soft Deletion Causing issues
This commit is contained in:
Mohit Yadav 2025-06-26 16:03:36 +05:30 committed by GitHub
parent b7aa73c24a
commit b8afbb4ed2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 8 deletions

View File

@ -1378,10 +1378,7 @@ public abstract class EntityRepository<T extends EntityInterface> {
// For example ingestion pipeline deletes a pipeline in AirFlow.
}
protected void postDelete(T entity) {
// Dispatch entity deleted event to all registered handlers
EntityLifecycleEventDispatcher.getInstance().onEntityDeleted(entity, null);
}
protected void postDelete(T entity) {}
public final void deleteFromSearch(T entity, boolean hardDelete) {
if (hardDelete) {

View File

@ -253,7 +253,8 @@ public class GlossaryTermResource extends EntityResource<GlossaryTerm, GlossaryT
// Filter by glossary parent term
if (parentTermParam != null) {
GlossaryTerm parentTerm = repository.find(parentTermParam, Include.NON_DELETED);
GlossaryTerm parentTerm =
repository.get(null, parentTermParam, repository.getFields("parent"));
fqn = parentTerm.getFullyQualifiedName();
// Ensure parent glossary term belongs to the glossary

View File

@ -502,8 +502,8 @@ public class GlossaryTermResourceTest extends EntityResourceTest<GlossaryTerm, C
GlossaryTerm g2t5 = createTerm(glossary2, null, "g2t5");
assertEquals(Status.DRAFT, g2t5.getStatus());
waitForTaskToBeCreated(g2t5.getFullyQualifiedName());
assertEquals(
Status.IN_REVIEW, getEntity(g2t5.getId(), authHeaders(USER1.getName())).getStatus());
g2t5 = getEntity(g2t5.getId(), authHeaders(USER1.getName()));
assertEquals(Status.IN_REVIEW, g2t5.getStatus());
assertApprovalTask(g2t5, TaskStatus.Open); // A Request Approval task is opened
String origJson = JsonUtils.pojoToJson(g2t5);
@ -517,7 +517,7 @@ public class GlossaryTermResourceTest extends EntityResourceTest<GlossaryTerm, C
// Due to the Glossary Workflow changing the Status from 'DRAFT' to 'IN_REVIEW' as a
// GovernanceBot, two changes are created.
assertEquals(g2t5.getVersion(), previousVersion + 0.1);
assertEquals(g2t5.getVersion(), Math.round((previousVersion + 0.1) * 10.0) / 10.0);
assertTrue(
g2t5.getReviewers().containsAll(newReviewers)
&& newReviewers.containsAll(g2t5.getReviewers()));