From 6f35e5f73cb5429e4b3f85fa4ffb60e7cd51f5fe Mon Sep 17 00:00:00 2001 From: Ganesh Mahadevan Date: Tue, 27 Aug 2024 16:00:28 -0500 Subject: [PATCH] update test case --- .../snowflake/snowpark_test/JavaVariantSuite.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/test/java/com/snowflake/snowpark_test/JavaVariantSuite.java b/src/test/java/com/snowflake/snowpark_test/JavaVariantSuite.java index 8f31a004..f20e9dd2 100644 --- a/src/test/java/com/snowflake/snowpark_test/JavaVariantSuite.java +++ b/src/test/java/com/snowflake/snowpark_test/JavaVariantSuite.java @@ -369,14 +369,10 @@ public void equalsAndToString() { @Test public void javaJsonNodeVariantConverter() throws IllegalArgumentException { - // Scala variant to Java Variant - com.snowflake.snowpark.types.Variant sv = - new com.snowflake.snowpark.types.Variant( - "{\"name\": \"abc\",\"grade\": 2, \"Interest\": \"cricket\"}"); - Variant jResult = InternalUtils.createVariant(sv); - JsonNode jsonNode = jResult.asJsonNode(); + Variant jv = new Variant("{\"a\": [1, 2], \"b\": \"c\"}"); + JsonNode jNode = jv.asJsonNode(); - assert jsonNode.get("name").asText().equals("abc"); - assert jsonNode.get("grade").asInt() == 2; + assert (jNode.get("a").isArray()); + assert (jNode.get("b").asText().equals("c")); } }