Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,222 @@
/*
* Copyright 2024 Collate.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openmetadata.it.tests;

import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;

import java.time.Duration;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.awaitility.Awaitility;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.api.parallel.Execution;
import org.junit.jupiter.api.parallel.ExecutionMode;
import org.openmetadata.it.factories.DatabaseSchemaTestFactory;
import org.openmetadata.it.factories.DatabaseServiceTestFactory;
import org.openmetadata.it.util.SdkClients;
import org.openmetadata.it.util.TestNamespace;
import org.openmetadata.it.util.TestNamespaceExtension;
import org.openmetadata.schema.api.data.CreateTable;
import org.openmetadata.schema.api.domains.CreateDomain;
import org.openmetadata.schema.entity.data.DatabaseSchema;
import org.openmetadata.schema.entity.data.Table;
import org.openmetadata.schema.entity.domains.Domain;
import org.openmetadata.schema.entity.services.DatabaseService;
import org.openmetadata.schema.type.Column;
import org.openmetadata.schema.type.ColumnDataType;
import org.openmetadata.sdk.client.OpenMetadataClient;
import org.openmetadata.sdk.network.HttpMethod;
import org.openmetadata.sdk.network.RequestOptions;

/**
* Regression test for GitHub Issue #28923: after a domain is HARD deleted and a new domain is
* created with the same name (same FQN, new UUID), assets that belonged to the deleted domain must
* NOT reappear under the new domain.
*
* <p>The domain-assets listing filters by {@code domains.fullyQualifiedName} (see {@code
* InheritedFieldEntitySearch.forDomain}). Before the fix, the domain hard-delete search cleanup in
* {@code SearchRepository.deleteOrUpdateChildren} matched the singular {@code domain.id} and ran
* {@code ctx._source.remove('domain')} — but assets store the plural {@code domains} array, so the
* stale domain entry was never stripped from their search documents and a recreated same-FQN domain
* matched those stale docs.
*
* <p>The activity-history half of #28923 is covered deterministically by {@code
* ActivityFeedPublisherTest} (the activity write path is an async change-event consumer, so an
* end-to-end assertion here would be timing-dependent).
*/
@Execution(ExecutionMode.CONCURRENT)
@ExtendWith(TestNamespaceExtension.class)
public class DomainRecreateSameNameIT {

@Test
void test_recreatedDomainDoesNotInheritDeletedDomainAssets(TestNamespace ns) throws Exception {
OpenMetadataClient adminClient = SdkClients.adminClient();
String domainName = ns.shortPrefix() + "_recreate";

DatabaseService dbService = DatabaseServiceTestFactory.createPostgres(ns);
DatabaseSchema schema = DatabaseSchemaTestFactory.createSimple(ns, dbService);

Domain domainV1 = createDomain(adminClient, domainName);
String domainFqn = domainV1.getFullyQualifiedName();

Table table =
createTableInDomain(
adminClient, ns.shortPrefix() + "_asset", schema.getFullyQualifiedName(), domainFqn);

Awaitility.await("asset indexed under original domain")
.atMost(Duration.ofSeconds(30))
.pollInterval(Duration.ofSeconds(1))
.untilAsserted(
() ->
assertTrue(
domainAssetsContain(adminClient, domainV1.getId().toString(), table.getId()),
"Sanity: asset should be listed under the original domain before deletion"));

Map<String, String> hardDelete = new HashMap<>();
hardDelete.put("hardDelete", "true");
hardDelete.put("recursive", "true");
adminClient.domains().delete(domainV1.getId().toString(), hardDelete);

Domain domainV2 = createDomain(adminClient, domainName);
assertNotEquals(
domainV1.getId(), domainV2.getId(), "Recreated domain must be a new entity with a new id");

Awaitility.await("recreated domain must not inherit the deleted domain's assets")
.atMost(Duration.ofSeconds(30))
.pollInterval(Duration.ofSeconds(1))
.untilAsserted(
() ->
assertFalse(
domainAssetsContain(adminClient, domainV2.getId().toString(), table.getId()),
"Issue #28923: asset from the hard-deleted domain reappeared under the "
+ "recreated same-named domain"));
}

@Test
void test_recreatedSubdomainDoesNotInheritDeletedSubdomainAssets(TestNamespace ns)
throws Exception {
OpenMetadataClient adminClient = SdkClients.adminClient();
String parentName = ns.shortPrefix() + "_parent";
String childName = "child";

DatabaseService dbService = DatabaseServiceTestFactory.createPostgres(ns);
DatabaseSchema schema = DatabaseSchemaTestFactory.createSimple(ns, dbService);

Domain parentV1 = createDomain(adminClient, parentName);
Domain childV1 = createSubdomain(adminClient, childName, parentV1.getFullyQualifiedName());

Table table =
createTableInDomain(
adminClient,
ns.shortPrefix() + "_asset",
schema.getFullyQualifiedName(),
childV1.getFullyQualifiedName());

Awaitility.await("asset indexed under original subdomain")
.atMost(Duration.ofSeconds(30))
.pollInterval(Duration.ofSeconds(1))
.untilAsserted(
() ->
assertTrue(
domainAssetsContain(adminClient, childV1.getId().toString(), table.getId()),
"Sanity: asset should be listed under the original subdomain before deletion"));

Map<String, String> hardDelete = new HashMap<>();
hardDelete.put("hardDelete", "true");
hardDelete.put("recursive", "true");
adminClient.domains().delete(parentV1.getId().toString(), hardDelete);

// The subdomain strip is an async update-by-query; wait until it settles before recreating so
// the assertion is deterministic rather than racing the in-flight reindex.
Awaitility.await("deleted subdomain stripped from asset search doc")
.atMost(Duration.ofSeconds(60))
.pollInterval(Duration.ofSeconds(1))
.until(() -> !assetSearchDocReferencesDomain(adminClient, table.getId(), childV1.getId()));

Domain parentV2 = createDomain(adminClient, parentName);
Domain childV2 = createSubdomain(adminClient, childName, parentV2.getFullyQualifiedName());
assertNotEquals(
childV1.getId(), childV2.getId(), "Recreated subdomain must be a new entity with a new id");

Awaitility.await("recreated subdomain must not inherit the deleted subdomain's assets")
.atMost(Duration.ofSeconds(30))
.pollInterval(Duration.ofSeconds(1))
.untilAsserted(
() ->
assertFalse(
domainAssetsContain(adminClient, childV2.getId().toString(), table.getId()),
"Issue #28923: asset from the hard-deleted subdomain reappeared under the "
+ "recreated same-named subdomain (parent recursive hard delete)"));
}

private boolean assetSearchDocReferencesDomain(
OpenMetadataClient client, Object assetId, Object domainId) throws Exception {
String response =
client
.getHttpClient()
.executeForString(
HttpMethod.GET,
"/v1/search/query?q=id:" + assetId + "&index=table_search_index&from=0&size=1",
null,
RequestOptions.builder().build());
return response.contains("\"" + domainId + "\"");
}

private boolean domainAssetsContain(OpenMetadataClient client, String domainId, Object assetId)
throws Exception {
String response =
client
.getHttpClient()
.executeForString(
HttpMethod.GET,
"/v1/domains/" + domainId + "/assets?limit=100&offset=0",
null,
RequestOptions.builder().build());
return response.contains("\"id\":\"" + assetId + "\"");
}

private Domain createDomain(OpenMetadataClient client, String name) {
CreateDomain createDomain =
new CreateDomain()
.withName(name)
.withDomainType(CreateDomain.DomainType.AGGREGATE)
.withDescription("Domain for issue #28923 recreate-same-name regression test");
return client.domains().create(createDomain);
}

private Domain createSubdomain(OpenMetadataClient client, String name, String parentFqn) {
CreateDomain createDomain =
new CreateDomain()
.withName(name)
.withDomainType(CreateDomain.DomainType.AGGREGATE)
.withParent(parentFqn)
.withDescription("Subdomain for issue #28923 recreate-same-name regression test");
return client.domains().create(createDomain);
}

private Table createTableInDomain(
OpenMetadataClient client, String name, String schemaFqn, String domainFqn) {
Column column = new Column().withName("id").withDataType(ColumnDataType.INT);
CreateTable createTable =
new CreateTable()
.withName(name)
.withDatabaseSchema(schemaFqn)
.withColumns(List.of(column))
.withDomains(List.of(domainFqn));
return client.tables().create(createTable);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.openmetadata.schema.entity.events.SubscriptionDestination;
import org.openmetadata.schema.entity.feed.Thread;
import org.openmetadata.schema.type.ChangeEvent;
import org.openmetadata.schema.type.EventType;
import org.openmetadata.schema.utils.JsonUtils;
import org.openmetadata.service.Entity;
import org.openmetadata.service.apps.bundles.changeEvent.Destination;
Expand Down Expand Up @@ -58,6 +59,15 @@ public ActivityFeedPublisher(
public void sendMessage(ChangeEvent changeEvent, Set<Recipient> recipients)
throws EventPublisherException {
try {
// Hard delete (soft delete emits ENTITY_SOFT_DELETED): purge the entity's feed threads by
// entity id instead of recording a "Permanently Deleted" thread. deleteByAbout also removes
// the FQN-keyed field_relationship rows, so an entity later recreated with the same fully
// qualified name does not inherit the dead entity's activity (#28923). This runs after the
// delete transaction commits, so it also supersedes this trailing delete event itself.
if (changeEvent.getEventType() == EventType.ENTITY_DELETED) {
feedRepository.deleteByAbout(changeEvent.getEntityId());
return;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Repository Java conventions violated

The new hard-delete branch introduces an early return, while the accompanying integration tests also contain oversized multi-responsibility methods and raw JSON literals passed to contains. Restructure sendMessage to use a single trailing return, extract focused test helpers, and replace the repeated response fragments with named constants to comply with the repository’s Java standards.

Context Used: CLAUDE.md (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

}
// Thread are created in FeedRepository Directly
if (!changeEvent.getEntityType().equals(Entity.THREAD)) {
for (Thread thread :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ public interface SearchClient
}
}
""";
String REMOVE_DOMAINS_CHILDREN_SCRIPT = "ctx._source.remove('domain')";
String REMOVE_DOMAINS_CHILDREN_SCRIPT =
"ctx._source.domains.removeIf(domain -> domain.id == params.id)";

// Updates field if null or if inherited is true and the parent is the same (matched by previous
// ID), setting inherited=true on the new object.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2700,10 +2700,14 @@ public void deleteOrUpdateChildren(EntityInterface entity, IndexMapping indexMap
String entityType = entity.getEntityReference().getType();
switch (entityType) {
case Entity.DOMAIN -> {
// Assets store the domain in the plural "domains" array, so strip the deleted domain from
// every referencing asset by matching domains.id. Matching the singular "domain" field left
// stale references behind, which a same-named recreated domain then inherited (#28923).
searchClient.updateChildren(
GLOBAL_SEARCH_ALIAS,
new ImmutablePair<>(entityType + ".id", docId),
new ImmutablePair<>(REMOVE_DOMAINS_CHILDREN_SCRIPT, null));
new ImmutablePair<>("domains.id", docId),
new ImmutablePair<>(
REMOVE_DOMAINS_CHILDREN_SCRIPT, Collections.singletonMap("id", docId)));
// we are doing below because we want to delete the data products with domain when domain is
// deleted
searchClient.deleteEntityByFields(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mockConstruction;
import static org.mockito.Mockito.mockStatic;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

import java.util.Collections;
Expand All @@ -25,6 +28,7 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
import org.mockito.MockedConstruction;
import org.mockito.MockedStatic;
import org.mockito.junit.jupiter.MockitoExtension;
import org.mockito.junit.jupiter.MockitoSettings;
Expand All @@ -35,6 +39,7 @@
import org.openmetadata.schema.type.EventType;
import org.openmetadata.service.events.errors.EventPublisherException;
import org.openmetadata.service.exception.EntityNotFoundException;
import org.openmetadata.service.jdbi3.FeedRepository;
import org.openmetadata.service.util.FeedUtils;

@ExtendWith(MockitoExtension.class)
Expand Down Expand Up @@ -83,6 +88,45 @@ void testSendMessage_ThrowsOnNonEntityNotFoundException() {
}
}

@Test
void testSendMessage_HardDeletePurgesActivityById() throws EventPublisherException {
ChangeEvent event = createChangeEvent(EventType.ENTITY_DELETED);

try (MockedConstruction<FeedRepository> feedRepoConstruction =
mockConstruction(FeedRepository.class);
MockedStatic<FeedUtils> mockedFeedUtils = mockStatic(FeedUtils.class)) {
ActivityFeedPublisher hardDeletePublisher =
new ActivityFeedPublisher(eventSubscription, subscriptionDestination);

assertDoesNotThrow(() -> hardDeletePublisher.sendMessage(event, Collections.emptySet()));

FeedRepository feedRepository = feedRepoConstruction.constructed().getFirst();
verify(feedRepository).deleteByAbout(event.getEntityId());
mockedFeedUtils.verify(() -> FeedUtils.getThreadWithMessage(any(), any()), never());
}
}

@Test
void testSendMessage_SoftDeleteDoesNotPurge() throws EventPublisherException {
ChangeEvent event = createChangeEvent(EventType.ENTITY_SOFT_DELETED);

try (MockedConstruction<FeedRepository> feedRepoConstruction =
mockConstruction(FeedRepository.class);
MockedStatic<FeedUtils> mockedFeedUtils = mockStatic(FeedUtils.class)) {
mockedFeedUtils
.when(() -> FeedUtils.getThreadWithMessage(any(), any()))
.thenReturn(Collections.emptyList());
ActivityFeedPublisher softDeletePublisher =
new ActivityFeedPublisher(eventSubscription, subscriptionDestination);

assertDoesNotThrow(() -> softDeletePublisher.sendMessage(event, Collections.emptySet()));

FeedRepository feedRepository = feedRepoConstruction.constructed().getFirst();
verify(feedRepository, never()).deleteByAbout(any(UUID.class));
mockedFeedUtils.verify(() -> FeedUtils.getThreadWithMessage(any(), any()));
}
}

private ChangeEvent createChangeEvent(EventType eventType) {
ChangeEvent event = new ChangeEvent();
event.setEventType(eventType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,7 @@
@SuppressWarnings("unchecked")
ArgumentCaptor<Pair<String, String>> matchCaptor = ArgumentCaptor.forClass(Pair.class);
verify(searchClient)
.updateChildren(

Check failure on line 1097 in openmetadata-service/src/test/java/org/openmetadata/service/search/SearchRepositoryBehaviorTest.java

View workflow job for this annotation

GitHub Actions / Test Report

SearchRepositoryBehaviorTest.propagateCertificationTagsCascadesToTableChildrenOnAdd

Argument(s) are different! Wanted: searchClient.updateChildren( [cluster_column_search_index], <Capturing argument: Pair>, <Capturing argument: Pair> ); -> at org.openmetadata.service.search.SearchRepositoryBehaviorTest.propagateCertificationTagsCascadesToTableChildrenOnAdd(SearchRepositoryBehaviorTest.java:1097) Actual invocations have different arguments at position [0]: searchClient.updateEntity( "cluster_table_search_index", "c7cac9b7-12c5-4a0e-b5d2-f78b74ef6d89", {"tagFQN" = "Certification.Gold", "name" = "Gold", "description" = "Certified", "style" = null}, "if (ctx._source.certification != null && ctx._source.certification.tagLabel != null) { ctx._source.certification.tagLabel.style = params.style; ctx._source.certification.tagLabel.description = params.description; ctx._source.certification.tagLabel.tagFQN = params.tagFQN; ctx._source.certification.tagLabel.name = params.name; } " ); -> at org.openmetadata.service.search.SearchRepository.updateEntityCertificationInSearch(SearchRepository.java:2084) searchClient.updateChildren( [cluster_tableColumn], (table.id,c7cac9b7-12c5-4a0e-b5d2-f78b74ef6d89), (if (params.certification == null) { ctx._source.remove('certification'); } else { ctx._source.certification = params.certification; } ,{certification=org.openmetadata.schema.type.AssetCertification@1e2744e3[tagLabel=org.openmetadata.schema.type.TagLabel@5ca42f53[tagFQN=Certification.Gold,name=Gold,displayName=<null>,description=Certified,style=<null>,source=Classification,labelType=Manual,state=Confirmed,href=<null>,reason=<null>,appliedAt=<null>,appliedBy=<null>,metadata=<null>],appliedDate=<null>,expiryDate=<null>]}) ); -> at org.openmetadata.service.search.SearchRepository.cascadeCertificationToChildren(SearchRepository.java:2044)
Raw output
Argument(s) are different! Wanted:
searchClient.updateChildren(
    [cluster_column_search_index],
    <Capturing argument: Pair>,
    <Capturing argument: Pair>
);
-> at org.openmetadata.service.search.SearchRepositoryBehaviorTest.propagateCertificationTagsCascadesToTableChildrenOnAdd(SearchRepositoryBehaviorTest.java:1097)
Actual invocations have different arguments at position [0]:
searchClient.updateEntity(
    "cluster_table_search_index",
    "c7cac9b7-12c5-4a0e-b5d2-f78b74ef6d89",
    {"tagFQN" = "Certification.Gold", "name" = "Gold", "description" = "Certified", "style" = null},
    "if (ctx._source.certification != null && ctx._source.certification.tagLabel != null) {
  ctx._source.certification.tagLabel.style = params.style;
  ctx._source.certification.tagLabel.description = params.description;
  ctx._source.certification.tagLabel.tagFQN = params.tagFQN;
  ctx._source.certification.tagLabel.name = params.name;
}
"
);
-> at org.openmetadata.service.search.SearchRepository.updateEntityCertificationInSearch(SearchRepository.java:2084)
searchClient.updateChildren(
    [cluster_tableColumn],
    (table.id,c7cac9b7-12c5-4a0e-b5d2-f78b74ef6d89),
    (if (params.certification == null) {
  ctx._source.remove('certification');
} else {
  ctx._source.certification = params.certification;
}
,{certification=org.openmetadata.schema.type.AssetCertification@1e2744e3[tagLabel=org.openmetadata.schema.type.TagLabel@5ca42f53[tagFQN=Certification.Gold,name=Gold,displayName=<null>,description=Certified,style=<null>,source=Classification,labelType=Manual,state=Confirmed,href=<null>,reason=<null>,appliedAt=<null>,appliedBy=<null>,metadata=<null>],appliedDate=<null>,expiryDate=<null>]})
);
-> at org.openmetadata.service.search.SearchRepository.cascadeCertificationToChildren(SearchRepository.java:2044)

	at org.openmetadata.service.search.SearchRepositoryBehaviorTest.propagateCertificationTagsCascadesToTableChildrenOnAdd(SearchRepositoryBehaviorTest.java:1097)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
eq(List.of("cluster_column_search_index")),
matchCaptor.capture(),
updatesCaptor.capture());
Expand Down Expand Up @@ -1125,7 +1125,7 @@
ArgumentCaptor<Pair<String, Map<String, Object>>> updatesCaptor =
ArgumentCaptor.forClass(Pair.class);
verify(searchClient)
.updateChildren(

Check failure on line 1128 in openmetadata-service/src/test/java/org/openmetadata/service/search/SearchRepositoryBehaviorTest.java

View workflow job for this annotation

GitHub Actions / Test Report

SearchRepositoryBehaviorTest.propagateCertificationTagsCascadesNullToTableChildrenOnRemove

Argument(s) are different! Wanted: searchClient.updateChildren( [cluster_column_search_index], <any org.apache.commons.lang3.tuple.Pair>, <Capturing argument: Pair> ); -> at org.openmetadata.service.search.SearchRepositoryBehaviorTest.propagateCertificationTagsCascadesNullToTableChildrenOnRemove(SearchRepositoryBehaviorTest.java:1128) Actual invocations have different arguments at position [0]: searchClient.updateEntity( "cluster_table_search_index", "ea94dcc3-90a6-4b08-95ef-d3fa2b6dd25f", {"tagFQN" = null, "name" = null, "description" = null, "style" = null}, "if (ctx._source.certification != null && ctx._source.certification.tagLabel != null) { ctx._source.certification.tagLabel.style = params.style; ctx._source.certification.tagLabel.description = params.description; ctx._source.certification.tagLabel.tagFQN = params.tagFQN; ctx._source.certification.tagLabel.name = params.name; } " ); -> at org.openmetadata.service.search.SearchRepository.updateEntityCertificationInSearch(SearchRepository.java:2084) searchClient.updateChildren( [cluster_tableColumn], (table.id,ea94dcc3-90a6-4b08-95ef-d3fa2b6dd25f), (if (params.certification == null) { ctx._source.remove('certification'); } else { ctx._source.certification = params.certification; } ,{certification=null}) ); -> at org.openmetadata.service.search.SearchRepository.cascadeCertificationToChildren(SearchRepository.java:2044)
Raw output
Argument(s) are different! Wanted:
searchClient.updateChildren(
    [cluster_column_search_index],
    <any org.apache.commons.lang3.tuple.Pair>,
    <Capturing argument: Pair>
);
-> at org.openmetadata.service.search.SearchRepositoryBehaviorTest.propagateCertificationTagsCascadesNullToTableChildrenOnRemove(SearchRepositoryBehaviorTest.java:1128)
Actual invocations have different arguments at position [0]:
searchClient.updateEntity(
    "cluster_table_search_index",
    "ea94dcc3-90a6-4b08-95ef-d3fa2b6dd25f",
    {"tagFQN" = null, "name" = null, "description" = null, "style" = null},
    "if (ctx._source.certification != null && ctx._source.certification.tagLabel != null) {
  ctx._source.certification.tagLabel.style = params.style;
  ctx._source.certification.tagLabel.description = params.description;
  ctx._source.certification.tagLabel.tagFQN = params.tagFQN;
  ctx._source.certification.tagLabel.name = params.name;
}
"
);
-> at org.openmetadata.service.search.SearchRepository.updateEntityCertificationInSearch(SearchRepository.java:2084)
searchClient.updateChildren(
    [cluster_tableColumn],
    (table.id,ea94dcc3-90a6-4b08-95ef-d3fa2b6dd25f),
    (if (params.certification == null) {
  ctx._source.remove('certification');
} else {
  ctx._source.certification = params.certification;
}
,{certification=null})
);
-> at org.openmetadata.service.search.SearchRepository.cascadeCertificationToChildren(SearchRepository.java:2044)

	at org.openmetadata.service.search.SearchRepositoryBehaviorTest.propagateCertificationTagsCascadesNullToTableChildrenOnRemove(SearchRepositoryBehaviorTest.java:1128)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
eq(List.of("cluster_column_search_index")), any(Pair.class), updatesCaptor.capture());
assertEquals(SearchClient.CASCADE_CERTIFICATION_SCRIPT, updatesCaptor.getValue().getLeft());
assertNull(updatesCaptor.getValue().getRight().get("certification"));
Expand Down Expand Up @@ -2370,9 +2370,10 @@
.updateChildren(
SearchClient.GLOBAL_SEARCH_ALIAS,
new org.apache.commons.lang3.tuple.ImmutablePair<>(
"domain.id", domain.getId().toString()),
"domains.id", domain.getId().toString()),
new org.apache.commons.lang3.tuple.ImmutablePair<>(
SearchClient.REMOVE_DOMAINS_CHILDREN_SCRIPT, null));
SearchClient.REMOVE_DOMAINS_CHILDREN_SCRIPT,
Map.of("id", domain.getId().toString())));
verify(searchClient)
.deleteEntityByFields(
List.of("cluster_domain_search_index"),
Expand Down
Loading