Skip to content

Commit e0c496a

Browse files
committed
Fix Build
1 parent a84ad3f commit e0c496a

1 file changed

Lines changed: 0 additions & 38 deletions

File tree

openmetadata-service/src/test/java/org/openmetadata/service/search/SearchIndexUtilsTest.java

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import java.util.UUID;
1414
import org.junit.jupiter.api.Test;
1515
import org.mockito.MockedStatic;
16-
import org.openmetadata.schema.entity.data.Page;
1716
import org.openmetadata.schema.entity.data.Table;
1817
import org.openmetadata.schema.entity.data.Topic;
1918
import org.openmetadata.schema.tests.DataQualityReport;
@@ -26,8 +25,6 @@
2625
import org.openmetadata.schema.type.TagLabel;
2726
import org.openmetadata.schema.type.change.ChangeSource;
2827
import org.openmetadata.schema.type.change.ChangeSummary;
29-
import org.openmetadata.schema.utils.JsonUtils;
30-
import org.openmetadata.service.Entity;
3128
import org.openmetadata.service.TypeRegistry;
3229

3330
class SearchIndexUtilsTest {
@@ -66,41 +63,6 @@ void testParseHelpersAndRemoveFieldByPathSupportsNestedLists() {
6663
assertFalse(doc.containsKey("simple"));
6764
}
6865

69-
@Test
70-
void testNormalizeFollowersExpandsIdStringsIntoEntityReferences() {
71-
UUID followerId = UUID.randomUUID();
72-
Map<String, Object> source = new HashMap<>();
73-
source.put("id", UUID.randomUUID().toString());
74-
source.put("name", "test-page");
75-
source.put("pageType", "Article");
76-
source.put("followers", new ArrayList<>(List.of(followerId.toString())));
77-
78-
assertThrows(
79-
IllegalArgumentException.class,
80-
() -> JsonUtils.readOrConvertValueLenient(source, Page.class));
81-
82-
SearchIndexUtils.normalizeFollowers(source);
83-
Page page = JsonUtils.readOrConvertValueLenient(source, Page.class);
84-
85-
assertEquals(1, page.getFollowers().size());
86-
EntityReference follower = page.getFollowers().getFirst();
87-
assertEquals(followerId, follower.getId());
88-
assertEquals(Entity.USER, follower.getType());
89-
}
90-
91-
@Test
92-
void testNormalizeFollowersLeavesEmptyOrMissingFollowersUntouched() {
93-
Map<String, Object> missing = new HashMap<>();
94-
missing.put("name", "no-followers");
95-
SearchIndexUtils.normalizeFollowers(missing);
96-
assertFalse(missing.containsKey("followers"));
97-
98-
Map<String, Object> empty = new HashMap<>();
99-
empty.put("followers", new ArrayList<>());
100-
SearchIndexUtils.normalizeFollowers(empty);
101-
assertEquals(List.of(), empty.get("followers"));
102-
}
103-
10466
@Test
10567
void testBuildAggregationTreeAndParseMetricAggregationReport() {
10668
SearchAggregation aggregation =

0 commit comments

Comments
 (0)