Skip to content
Merged
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
Expand Up @@ -18,9 +18,6 @@
*/
package org.apache.polaris.core.persistence;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import jakarta.annotation.Nonnull;
import java.util.ArrayList;
import java.util.HashSet;
Expand Down Expand Up @@ -69,7 +66,6 @@ public class PolarisTestMetaStoreManager {

// the start time
private final long testStartTime;
private final ObjectMapper objectMapper = new ObjectMapper();

private final boolean supportsChangeTracking;

Expand Down Expand Up @@ -1515,14 +1511,14 @@ public PolarisBaseEntity updateEntity(
Assertions.assertThat(afterUpdateEntity.getGrantRecordsVersion()).isEqualTo(grantRecsVersion);

// update should have been performed
Assertions.assertThat(jsonNode(updatedEntity.getProperties()))
.isEqualTo(jsonNode(updatedPropEntity.getProperties()));
Assertions.assertThat(jsonNode(afterUpdateEntity.getProperties()))
.isEqualTo(jsonNode(updatedPropEntity.getProperties()));
Assertions.assertThat(jsonNode(updatedEntity.getInternalProperties()))
.isEqualTo(jsonNode(updatedPropEntity.getInternalProperties()));
Assertions.assertThat(jsonNode(afterUpdateEntity.getInternalProperties()))
.isEqualTo(jsonNode(updatedPropEntity.getInternalProperties()));
Assertions.assertThat(updatedEntity.getPropertiesAsMap())
.isEqualTo(updatedPropEntity.getPropertiesAsMap());
Assertions.assertThat(afterUpdateEntity.getPropertiesAsMap())
.isEqualTo(updatedPropEntity.getPropertiesAsMap());
Assertions.assertThat(updatedEntity.getInternalPropertiesAsMap())
.isEqualTo(updatedPropEntity.getInternalPropertiesAsMap());
Assertions.assertThat(afterUpdateEntity.getInternalPropertiesAsMap())
.isEqualTo(updatedPropEntity.getInternalPropertiesAsMap());

// lookup the tracking slice to verify this has been updated too
if (supportsChangeTracking) {
Expand All @@ -1542,17 +1538,6 @@ public PolarisBaseEntity updateEntity(
return updatedEntity;
}

private JsonNode jsonNode(String json) {
if (json == null) {
return null;
}
try {
return objectMapper.readTree(json);
} catch (JsonProcessingException e) {
throw new RuntimeException(e);
}
}

/** Execute a list operation and validate the result */
private void validateListReturn(
List<PolarisEntityCore> path,
Expand Down