You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "singhpk234 (via GitHub)" <gi...@apache.org> on 2025/06/02 06:32:56 UTC
[PR] REST: Move tests added in PR-12818 to AssertJ [iceberg]
singhpk234 opened a new pull request, #13213:
URL: https://github.com/apache/iceberg/pull/13213
### About the change
Move tests to assertJ - address feedback https://github.com/apache/iceberg/pull/12818#discussion_r2120167480
cc @nastra
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Build, Core: Move assertions to AssertJ / Fix checkstyle rules [iceberg]
Posted by "nastra (via GitHub)" <gi...@apache.org>.
nastra merged PR #13213:
URL: https://github.com/apache/iceberg/pull/13213
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] REST: Move tests added in PR-12818 to AssertJ [iceberg]
Posted by "nastra (via GitHub)" <gi...@apache.org>.
nastra commented on code in PR #13213:
URL: https://github.com/apache/iceberg/pull/13213#discussion_r2120380545
##########
core/src/test/java/org/apache/iceberg/rest/TestRESTCatalog.java:
##########
@@ -2655,19 +2654,20 @@ public void testTableExistsFallbackToGETRequest() {
@Test
public void testErrorHandlingForConflicts() {
Consumer<ErrorResponse> errorResponseConsumer = ErrorHandlers.tableCommitHandler();
+
// server returning 409 with client without retrying
ErrorResponse errorResponse409WithoutRetries =
ErrorResponse.builder().responseCode(409).wasRetried(false).build();
- Assertions.assertThrows(
- CommitFailedException.class,
- () -> errorResponseConsumer.accept(errorResponse409WithoutRetries));
+ assertThatThrownBy(() -> errorResponseConsumer.accept(errorResponse409WithoutRetries))
Review Comment:
can you also please update the checkstyle rule that should have caught this?
```
--- a/.baseline/checkstyle/checkstyle.xml
+++ b/.baseline/checkstyle/checkstyle.xml
@@ -451,7 +451,7 @@
</module>
<module name="IllegalImport">
<property name="id" value="BanJUnit5Assertions"/>
- <property name="illegalPkgs" value="org.junit.jupiter.api.Assertions"/>
+ <property name="illegalClasses" value="org.junit.jupiter.api.Assertions"/>
<message key="import.illegal" value="Prefer using org.assertj.core.api.Assertions instead."/>
</module>
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] REST: Move tests added in PR-12818 to AssertJ [iceberg]
Posted by "nastra (via GitHub)" <gi...@apache.org>.
nastra commented on code in PR #13213:
URL: https://github.com/apache/iceberg/pull/13213#discussion_r2120380545
##########
core/src/test/java/org/apache/iceberg/rest/TestRESTCatalog.java:
##########
@@ -2655,19 +2654,20 @@ public void testTableExistsFallbackToGETRequest() {
@Test
public void testErrorHandlingForConflicts() {
Consumer<ErrorResponse> errorResponseConsumer = ErrorHandlers.tableCommitHandler();
+
// server returning 409 with client without retrying
ErrorResponse errorResponse409WithoutRetries =
ErrorResponse.builder().responseCode(409).wasRetried(false).build();
- Assertions.assertThrows(
- CommitFailedException.class,
- () -> errorResponseConsumer.accept(errorResponse409WithoutRetries));
+ assertThatThrownBy(() -> errorResponseConsumer.accept(errorResponse409WithoutRetries))
Review Comment:
can you also please update the checkstyle rule that should have caught this?
```
--- a/.baseline/checkstyle/checkstyle.xml
+++ b/.baseline/checkstyle/checkstyle.xml
@@ -441,7 +441,7 @@
</module>
<module name="IllegalImport">
<property name="id" value="BanJUnit5AssumptionsUsage"/>
- <property name="illegalPkgs" value="org.junit.jupiter.api.Assumptions"/>
+ <property name="illegalClasses" value="org.junit.jupiter.api.Assumptions"/>
<message key="import.illegal" value="Prefer using Assertions.assumeThat(...).isTrue() instead."/>
</module>
<module name="IllegalImport">
@@ -451,7 +451,7 @@
</module>
<module name="IllegalImport">
<property name="id" value="BanJUnit5Assertions"/>
- <property name="illegalPkgs" value="org.junit.jupiter.api.Assertions"/>
+ <property name="illegalClasses" value="org.junit.jupiter.api.Assertions"/>
<message key="import.illegal" value="Prefer using org.assertj.core.api.Assertions instead."/>
</module>
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org