apache / iceberg

Apache Iceberg
https://iceberg.apache.org/
Apache License 2.0
6.49k stars 2.24k forks source link

Spark: Use assumeThat(format).isEqualTo(FileFormat.PARQUET) instead of assumeThat(format).isEqualTo(parquet) #11540

Closed huaxingao closed 1 week ago

huaxingao commented 1 week ago

With assertj-core-3.26.3.jar, assumeThat(format).isEqualTo("parquet") is failed and the test is silently aborted.

Screenshot 2024-11-13 at 10 09 11 AM
szehon-ho commented 1 week ago

So strange, do you know why it aborts instead of fails?

szehon-ho commented 1 week ago

Can you fix the pr description like <component>: <short description>?

huaxingao commented 1 week ago

So strange, do you know why it aborts instead of fails?

I think the purpose of assumeThat is to determine whether the conditions are suitable for a test to continue. If an assumption fails (e.g., if the file format is not parquet), JUnit will skip the execution of the test case and mark it as ignored rather than failing it.

szehon-ho commented 1 week ago

Ah got it, actually wdyt to change it to assertThat?

huaxingao commented 1 week ago

actually wdyt to change it to assertThat?

In this test suite, the file format could also be ORC or AVRO. We want to ignore this specific test testPosDeletesOnParquetFileWithMultipleRowGroups() for ORC and AVRO format, that's why we use assumeThat instead of assertThat.

amogh-jahagirdar commented 1 week ago

Thanks @huaxingao , and @szehon-ho @Fokko @dramaticlly for reviewing the changes

huaxingao commented 1 week ago

Thanks @amogh-jahagirdar @szehon-ho @Fokko @dramaticlly