This is an automated email from the ASF dual-hosted git repository.
yufei pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris.git
The following commit(s) were added to refs/heads/main by this push:
new 37a922197 Remove PolarisTestMetaStoreManager.jsonNode helper (#2513)
37a922197 is described below
commit 37a9221974418a5b6e62a1145fec841cabae5643
Author: Christopher Lambert <[email protected]>
AuthorDate: Sat Sep 6 01:11:08 2025 +0200
Remove PolarisTestMetaStoreManager.jsonNode helper (#2513)
---
.../persistence/PolarisTestMetaStoreManager.java | 31 ++++++----------------
1 file changed, 8 insertions(+), 23 deletions(-)
diff --git
a/polaris-core/src/testFixtures/java/org/apache/polaris/core/persistence/PolarisTestMetaStoreManager.java
b/polaris-core/src/testFixtures/java/org/apache/polaris/core/persistence/PolarisTestMetaStoreManager.java
index 646aeee51..4b490b032 100644
---
a/polaris-core/src/testFixtures/java/org/apache/polaris/core/persistence/PolarisTestMetaStoreManager.java
+++
b/polaris-core/src/testFixtures/java/org/apache/polaris/core/persistence/PolarisTestMetaStoreManager.java
@@ -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;
@@ -69,7 +66,6 @@ public class PolarisTestMetaStoreManager {
// the start time
private final long testStartTime;
- private final ObjectMapper objectMapper = new ObjectMapper();
private final boolean supportsChangeTracking;
@@ -1515,14 +1511,14 @@ public class PolarisTestMetaStoreManager {
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) {
@@ -1542,17 +1538,6 @@ public class PolarisTestMetaStoreManager {
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,