Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[incubator-kie-issues#1411] Ban usage of Junit assertions inside DMN #6062

Merged
merged 2 commits into from
Sep 4, 2024

Conversation

gitgabrio
Copy link
Contributor

@gitgabrio gitgabrio commented Sep 3, 2024

Fixes apache/incubator-kie-issues#1461

This PR:

  1. remove usage of Junit assertions
  2. enforce/ban their reintroduction

@bncriju FYI

How to replicate CI configuration locally?

Build Chain tool does "simple" maven build(s), the builds are just Maven commands, but because the repositories relates and depends on each other and any change in API or class method could affect several of those repositories there is a need to use build-chain tool to handle cross repository builds and be sure that we always use latest version of the code for each repository.

build-chain tool is a build tool which can be used on command line locally or in Github Actions workflow(s), in case you need to change multiple repositories and send multiple dependent pull requests related with a change you can easily reproduce the same build by executing it on Github hosted environment or locally in your development environment. See local execution details to get more information about it.

How to retest this PR or trigger a specific build:
  • for pull request and downstream checks

    • Push a new commit to the PR. An empty commit would be enough.
  • for a full downstream build

    • for github actions job: add the label run_fdb
  • for Jenkins PR check only

@gitgabrio
Copy link
Contributor Author

Kogito Downstream / kogito-apps (ubuntu-latest / Java-17 / Maven-3.9.6) (pull_request) failure unrelated

2024-09-04T07:01:18.2087606Z [ERROR] Tests run: 4, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 60.50 s <<< FAILURE! -- in org.kie.kogito.index.service.graphql.MongoWebSocketSubscriptionIT
2024-09-04T07:01:18.2090158Z [ERROR] org.kie.kogito.index.service.graphql.MongoWebSocketSubscriptionIT.testDomainSubscription -- Time elapsed: 60.12 s <<< ERROR!
2024-09-04T07:01:18.2091630Z java.util.concurrent.TimeoutException
2024-09-04T07:01:18.2092660Z 	at java.base/java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1960)
2024-09-04T07:01:18.2094012Z 	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2095)
2024-09-04T07:01:18.2095945Z 	at org.kie.kogito.index.service.graphql.AbstractWebSocketSubscriptionIT.assertDomainSubscription(AbstractWebSocketSubscriptionIT.java:159)
2024-09-04T07:01:18.2207717Z 	at org.kie.kogito.index.service.graphql.AbstractWebSocketSubscriptionIT.testDomainSubscription(AbstractWebSocketSubscriptionIT.java:144)
2024-09-04T07:01:18.2209585Z 	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
2024-09-04T07:01:18.2210869Z 	at io.quarkus.test.junit.QuarkusTestExtension.runExtensionMethod(QuarkusTestExtension.java:1013)
2024-09-04T07:01:18.2212464Z 	at io.quarkus.test.junit.QuarkusTestExtension.interceptTestMethod(QuarkusTestExtension.java:827)
2024-09-04T07:01:18.2213662Z 	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
2024-09-04T07:01:18.2214941Z 	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)

Copy link
Contributor

@pibizza pibizza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have suggested a number of small changes to make better use of assertj assertions.

I have other points for stream assertions but I think we can address them in a separate PR.

Once the suggestions are reviewed and eventually merged you can proceed.. Thank you.

Copy link
Contributor

@pibizza pibizza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you.

@gitgabrio gitgabrio merged commit a718bb2 into apache:main Sep 4, 2024
10 checks passed
@gitgabrio gitgabrio deleted the incubator-kie-issues#1461 branch September 4, 2024 13:48
rgdoliveira pushed a commit to rgdoliveira/drools that referenced this pull request Sep 5, 2024
…pache#6062)

* [incubator-kie-issues#1411] Ban usage of Junit assertions inside DMN

* [incubator-kie-issues#1411] Fixed as per PR suggestion

---------

Co-authored-by: Gabriele-Cardosi <[email protected]>
rodrigonull pushed a commit to rodrigonull/incubator-kie-drools that referenced this pull request Oct 7, 2024
…pache#6062)

* [incubator-kie-issues#1411] Ban usage of Junit assertions inside DMN

* [incubator-kie-issues#1411] Fixed as per PR suggestion

---------

Co-authored-by: Gabriele-Cardosi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DMN - enforce usage of AssertJ assertions (ban usage of JUnit assertions)
4 participants