From 10cc8f3ee154be18e6829d23fc4222fed2bd71a1 Mon Sep 17 00:00:00 2001 From: "ryan02.yang" Date: Thu, 14 Mar 2024 10:47:23 +0800 Subject: [PATCH] #2449 update assertEquals to assertArrayEquals --- .../catalog/TestTransformTableChange.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/spark-connector/src/test/java/com/datastrato/gravitino/spark/connector/catalog/TestTransformTableChange.java b/spark-connector/src/test/java/com/datastrato/gravitino/spark/connector/catalog/TestTransformTableChange.java index 30ccc2e498e..8b6e62f95ad 100644 --- a/spark-connector/src/test/java/com/datastrato/gravitino/spark/connector/catalog/TestTransformTableChange.java +++ b/spark-connector/src/test/java/com/datastrato/gravitino/spark/connector/catalog/TestTransformTableChange.java @@ -54,7 +54,7 @@ void testTransformRenameColumn() { com.datastrato.gravitino.rel.TableChange.RenameColumn gravitinoRenameColumn = (com.datastrato.gravitino.rel.TableChange.RenameColumn) gravitinoChange; - Assertions.assertEquals(oldFiledsName, gravitinoRenameColumn.getFieldName()); + Assertions.assertArrayEquals(oldFiledsName, gravitinoRenameColumn.getFieldName()); Assertions.assertEquals(newFiledName, gravitinoRenameColumn.getNewName()); } @@ -73,7 +73,7 @@ void testTransformUpdateColumnComment() { com.datastrato.gravitino.rel.TableChange.UpdateColumnComment gravitinoUpdateColumnComment = (com.datastrato.gravitino.rel.TableChange.UpdateColumnComment) gravitinoChange; - Assertions.assertEquals(fieldNames, gravitinoUpdateColumnComment.getFieldName()); + Assertions.assertArrayEquals(fieldNames, gravitinoUpdateColumnComment.getFieldName()); Assertions.assertEquals(newComment, gravitinoUpdateColumnComment.getNewComment()); } @@ -98,7 +98,7 @@ void testTransformAddColumn() { com.datastrato.gravitino.rel.TableChange.AddColumn gravitinoAddColumnFirst = (com.datastrato.gravitino.rel.TableChange.AddColumn) gravitinoChangeFirst; - Assertions.assertEquals(sparkAddColumnFirst.fieldNames(), gravitinoAddColumnFirst.fieldName()); + Assertions.assertArrayEquals(sparkAddColumnFirst.fieldNames(), gravitinoAddColumnFirst.fieldName()); Assertions.assertTrue( "string".equalsIgnoreCase(gravitinoAddColumnFirst.getDataType().simpleString())); Assertions.assertTrue( @@ -117,7 +117,7 @@ void testTransformAddColumn() { com.datastrato.gravitino.rel.TableChange.AddColumn gravitinoAddColumnAfter = (com.datastrato.gravitino.rel.TableChange.AddColumn) gravitinoChangeAfter; - Assertions.assertEquals(sparkAddColumnAfter.fieldNames(), gravitinoAddColumnAfter.fieldName()); + Assertions.assertArrayEquals(sparkAddColumnAfter.fieldNames(), gravitinoAddColumnAfter.fieldName()); Assertions.assertTrue( "string".equalsIgnoreCase(gravitinoAddColumnAfter.getDataType().simpleString())); Assertions.assertTrue( @@ -136,7 +136,7 @@ void testTransformAddColumn() { com.datastrato.gravitino.rel.TableChange.AddColumn gravitinoAddColumnDefault = (com.datastrato.gravitino.rel.TableChange.AddColumn) gravitinoChangeDefault; - Assertions.assertEquals( + Assertions.assertArrayEquals( sparkAddColumnDefault.fieldNames(), gravitinoAddColumnDefault.fieldName()); Assertions.assertTrue( "string".equalsIgnoreCase(gravitinoAddColumnDefault.getDataType().simpleString())); @@ -157,7 +157,7 @@ void testTransformDeleteColumn() { com.datastrato.gravitino.rel.TableChange.DeleteColumn gravitinoDeleteColumn = (com.datastrato.gravitino.rel.TableChange.DeleteColumn) gravitinoChange; - Assertions.assertEquals(sparkDeleteColumn.fieldNames(), gravitinoDeleteColumn.fieldName()); + Assertions.assertArrayEquals(sparkDeleteColumn.fieldNames(), gravitinoDeleteColumn.fieldName()); Assertions.assertEquals(sparkDeleteColumn.ifExists(), gravitinoDeleteColumn.getIfExists()); } @@ -174,7 +174,7 @@ void testTransformUpdateColumnType() { com.datastrato.gravitino.rel.TableChange.UpdateColumnType gravitinoUpdateColumnType = (com.datastrato.gravitino.rel.TableChange.UpdateColumnType) gravitinoChange; - Assertions.assertEquals( + Assertions.assertArrayEquals( sparkUpdateColumnType.fieldNames(), gravitinoUpdateColumnType.fieldName()); Assertions.assertTrue( "string".equalsIgnoreCase(gravitinoUpdateColumnType.getNewDataType().simpleString()));