Skip to content

AWS: Fix TestGlueCatalogTable#testCreateTable#10221

Merged
nastra merged 1 commit into
apache:mainfrom
aajisaka:fix-aws-integ
Apr 25, 2024
Merged

AWS: Fix TestGlueCatalogTable#testCreateTable#10221
nastra merged 1 commit into
apache:mainfrom
aajisaka:fix-aws-integ

Conversation

@aajisaka
Copy link
Copy Markdown
Member

@aajisaka aajisaka commented Apr 25, 2024

Problem

TestGlueCatalogTable#testCreateTable failed by the following assertion error:

org.opentest4j.AssertionFailedError: 
expected: 
  ["s3://iceberg-integ-684001615763-ap-northeast-3/writeDataLoc",
      "s3://iceberg-integ-684001615763-ap-northeast-3/writeMetaDataLoc",
      "s3://iceberg-integ-684001615763-ap-northeast-3/writeFolderStorageLoc"]
 but was: 
  ["s3://iceberg-integ-684001615763-ap-northeast-3/writeFolderStorageLoc",
      "s3://iceberg-integ-684001615763-ap-northeast-3/writeDataLoc",
      "s3://iceberg-integ-684001615763-ap-northeast-3/writeMetaDataLoc"]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at org.apache.iceberg.aws.glue.TestGlueCatalogTable.testCreateTable(TestGlueCatalogTable.java:97)

It's caused by the JUnit 5 upgrade #10086. After this change, the elements are not sorted before comparing the list.

Solution

Use containsExactlyInAnyOrderElementsOf method: https://www.javadoc.io/doc/org.assertj/assertj-core/latest/org/assertj/core/api/AbstractIterableAssert.html#containsExactlyInAnyOrderElementsOf(java.lang.Iterable).

Testing

Ran the integration test manually and it passed.

@github-actions github-actions Bot added the AWS label Apr 25, 2024
@aajisaka
Copy link
Copy Markdown
Member Author

Hi @nastra would you review this?

@nastra nastra merged commit 837a4aa into apache:main Apr 25, 2024
@aajisaka
Copy link
Copy Markdown
Member Author

Thanks a lot!

@aajisaka aajisaka deleted the fix-aws-integ branch April 25, 2024 14:23
sasankpagolu pushed a commit to sasankpagolu/iceberg that referenced this pull request Oct 27, 2024
zachdisc pushed a commit to zachdisc/iceberg that referenced this pull request Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants