You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "liuml07 (via GitHub)" <gi...@apache.org> on 2025/10/09 02:04:44 UTC
[PR] [FLINK-38488][tests] Use 'throws Exception' instead of try-catch-fail… [flink]
liuml07 opened a new pull request, #27092:
URL: https://github.com/apache/flink/pull/27092
https://issues.apache.org/jira/browse/FLINK-38488
Currently we have some tests using following patter:
```java
try {
doTestSomething();
...
} catch (Exception e) {
e.printStackTrace();
fail(e.getMessage());
}
```
This can be replaced by just throwing Exceptions in test and let JUnit handles the failure along with exception stack trace. The existing code loses stack trace information in test reports, and we need to look around in the stdout to guess.
As we can see other tests in Flink uses the "throws Exception" model:
- The framework provides better formatting and integration with IDEs and CI systems
- Test runners can distinguish between assertion failures and unexpected exceptions
- Test logic is more readable without exception handling noise
--
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@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-38488][tests] Use 'throws Exception' instead of try-catch-fail… [flink]
Posted by "liuml07 (via GitHub)" <gi...@apache.org>.
liuml07 commented on PR #27092:
URL: https://github.com/apache/flink/pull/27092#issuecomment-3407814461
I rebased again and it's still failing.
Failing tests in runtime module is tracked by [FLINK-38223](https://issues.apache.org/jira/browse/FLINK-38223). E2E tests are failing with the old same `panic: runtime error: invalid memory address or nil pointer dereference` error
--
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@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-38488][tests] Use 'throws Exception' instead of try-catch-fail… [flink]
Posted by "liuml07 (via GitHub)" <gi...@apache.org>.
liuml07 commented on PR #27092:
URL: https://github.com/apache/flink/pull/27092#issuecomment-3462808520
The failing test `testAdaptiveBatchScheduler` in another module is irrelevant. The failing python module seems a different problem as well which fails in other CI runs.
--
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@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-38488][tests] Use 'throws Exception' instead of try-catch-fail… [flink]
Posted by "ruanhang1993 (via GitHub)" <gi...@apache.org>.
ruanhang1993 commented on PR #27092:
URL: https://github.com/apache/flink/pull/27092#issuecomment-3392869229
@liuml07 Could you rebase the master branch and re-run the CI? The e2e tests have been fixed. Thanks.
--
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@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-38488][tests] Use 'throws Exception' instead of try-catch-fail… [flink]
Posted by "flinkbot (via GitHub)" <gi...@apache.org>.
flinkbot commented on PR #27092:
URL: https://github.com/apache/flink/pull/27092#issuecomment-3383803350
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "3afdc76ecfc8d9257d88095d295b6591c082da6d",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "3afdc76ecfc8d9257d88095d295b6591c082da6d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 3afdc76ecfc8d9257d88095d295b6591c082da6d UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run azure` re-run the last Azure build
</details>
--
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@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-38488][tests] Use 'throws Exception' instead of try-catch-fail… [flink]
Posted by "liuml07 (via GitHub)" <gi...@apache.org>.
liuml07 commented on PR #27092:
URL: https://github.com/apache/flink/pull/27092#issuecomment-3462810076
@ruanhang1993 do you think this PR is in a mergable shape, or we try more CI runs?
--
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@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-38488][tests] Use 'throws Exception' instead of try-catch-fail… [flink]
Posted by "ruanhang1993 (via GitHub)" <gi...@apache.org>.
ruanhang1993 commented on PR #27092:
URL: https://github.com/apache/flink/pull/27092#issuecomment-3393185821
@flinkbot run azure
--
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@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-38488][tests] Use 'throws Exception' instead of try-catch-fail… [flink]
Posted by "ruanhang1993 (via GitHub)" <gi...@apache.org>.
ruanhang1993 merged PR #27092:
URL: https://github.com/apache/flink/pull/27092
--
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@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-38488][tests] Use 'throws Exception' instead of try-catch-fail… [flink]
Posted by "liuml07 (via GitHub)" <gi...@apache.org>.
liuml07 commented on PR #27092:
URL: https://github.com/apache/flink/pull/27092#issuecomment-3386926603
The testing failure seems unrelated as [FLINK-38408](https://issues.apache.org/jira/browse/) tracks the `MapStateNullValueCheckpointingITCase` which is not frequently reproducible. Meanwhile, e2e tests are failing with system error as in other builds.
--
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@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-38488][tests] Use 'throws Exception' instead of try-catch-fail… [flink]
Posted by "liuml07 (via GitHub)" <gi...@apache.org>.
liuml07 commented on PR #27092:
URL: https://github.com/apache/flink/pull/27092#issuecomment-3383793286
@ruanhang1993 I know you are tracking some testing improvements. Could you review this? Thanks,
--
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@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org