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

Add munit test framework #536

Merged
merged 2 commits into from
Apr 23, 2024
Merged

Add munit test framework #536

merged 2 commits into from
Apr 23, 2024

Conversation

Philippus
Copy link
Contributor

Applying this PR will add support for testing routes with MUnit.

@He-Pin
Copy link
Member

He-Pin commented Apr 11, 2024

Thanks, but why a new test framework ?

@pjfanning
Copy link
Contributor

I'd prefer not to add more dependencies to the main testkit. Could this go into a new testkit extension module? Something like pekko-http-testkit-munit.

* license agreements; and to You under the Apache License, version 2.0:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
Copy link
Contributor

Choose a reason for hiding this comment

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

new code should get the standard ASF header - https://www.apache.org/legal/src-headers.html#headers

@mdedetrich
Copy link
Contributor

To me the issue is less about whether adding the dependency but more about whether the dependency itself is stable or not (talking about bincompat here).

If munit breaks fairly often, adding it to Pekko will create more problems then it solves

@He-Pin
Copy link
Member

He-Pin commented Apr 11, 2024

That true,scala gears has to self maintain a fork of munit.

@laglangyue
Copy link
Contributor

Agree that this is an extension module

@Philippus
Copy link
Contributor Author

To me the issue is less about whether adding the dependency but more about whether the dependency itself is stable or not (talking about bincompat here).

If munit breaks fairly often, adding it to Pekko will create more problems then it solves

The testkit doesn't guarantee binary compatibility: https://github.com/apache/pekko-http/blob/main/build.sbt#L225

@Philippus
Copy link
Contributor Author

I'd prefer not to add more dependencies to the main testkit. Could this go into a new testkit extension module? Something like pekko-http-testkit-munit.

I'll rework the PR and do that.

@Philippus
Copy link
Contributor Author

Philippus commented Apr 12, 2024

Thanks, but why a new test framework ?

This has been setting in our private repo for a while now, I thought it would be a nice addition. And afaics MUnit is gaining some traction.

@Philippus
Copy link
Contributor Author

I separated it into a module, please let me know if it is ok like this.

Copy link
Contributor

@pjfanning pjfanning left a comment

Choose a reason for hiding this comment

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

lgtm

@pjfanning pjfanning merged commit f8b0a22 into apache:main Apr 23, 2024
10 checks passed
@pjfanning
Copy link
Contributor

Thanks @Philippus - merging

Would you have any interest in making a similar PR for main Pekko repo to add a pekko-testkit-munit? There are a few more testkits there too (streams, actor-typed, persistence).

@pjfanning pjfanning added this to the 1.1.0 milestone Apr 23, 2024
@Philippus Philippus deleted the munit-fixture branch April 24, 2024 04:33
@Philippus
Copy link
Contributor Author

Philippus commented May 13, 2024

Thanks @Philippus - merging

Would you have any interest in making a similar PR for main Pekko repo to add a pekko-testkit-munit? There are a few more testkits there too (streams, actor-typed, persistence). And yes, I'm interested in making similar PR's for those.

There are more testkits, but I think only actor-typed and pekko-connectors-kafka have equivalent scalatest-specific functionality.

@pjfanning
Copy link
Contributor

@Philippus It isn't strictly necessary but could you consider supplying an iCLA (if you haven't done so already)?

https://www.apache.org/licenses/contributor-agreements.html

@pjfanning
Copy link
Contributor

Thanks @Philippus - your iCLA was received by the ASF Secretary.

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.

None yet

5 participants