mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-25 17:04:54 +00:00
FIx failing Maven CI Tests (#21975)
* Fix Glossary Test Failures * Fix Soft Deletion Causing issues
This commit is contained in:
parent
b7aa73c24a
commit
b8afbb4ed2
@ -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) {
|
||||
|
@ -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
|
||||
|
@ -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()));
|
||||
|
Loading…
x
Reference in New Issue
Block a user