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

+htt Support separation of route execution from checking in the Java DSL #1148

Merged
merged 3 commits into from Sep 11, 2017

Conversation

Projects
None yet
4 participants
@jonas
Member

jonas commented May 19, 2017

Port the ScalatestRouteTestSpec to JUnitRouteTestTest and move await of
the route result from RouteTest to TestRouteResult similar to how the
Scala RouteTest works. This breaks binary compatibility of the testkit,
however, no guarantees are given for that part of the Akka HTTP API.

Preliminary work needed to implement the Java API for #39 (integration
route testing).


References #1125 (WIP fix for #39)

@akka-ci akka-ci added validating tested and removed validating labels May 19, 2017

@akka-ci

This comment has been minimized.

Show comment
Hide comment
@akka-ci

akka-ci May 19, 2017

Collaborator

Test PASSed.

Collaborator

akka-ci commented May 19, 2017

Test PASSed.

@akka-ci akka-ci added validating and removed tested labels Jul 12, 2017

@jonas

This comment has been minimized.

Show comment
Hide comment
@jonas

jonas Jul 12, 2017

Member

Rebased and updated.

To follow up on #1148 (comment), the sealed/unsealed notion is a bit moot in this context since test routes are always "semi-sealed" in that a default exception handler is provided. I've added a runWithRejections method, which I think more clearly communicates what can be expected.

Member

jonas commented Jul 12, 2017

Rebased and updated.

To follow up on #1148 (comment), the sealed/unsealed notion is a bit moot in this context since test routes are always "semi-sealed" in that a default exception handler is provided. I've added a runWithRejections method, which I think more clearly communicates what can be expected.

@akka-ci akka-ci added tested and removed validating labels Jul 12, 2017

@akka-ci

This comment has been minimized.

Show comment
Hide comment
@akka-ci

akka-ci Jul 12, 2017

Collaborator

Test PASSed.

Collaborator

akka-ci commented Jul 12, 2017

Test PASSed.

.assertRejections(
Rejections.method(HttpMethods.GET),
Rejections.method(HttpMethods.PUT)
);

This comment has been minimized.

@raboof

raboof Jul 12, 2017

Member

That doesn't looks too bad indeed!

@raboof

raboof Jul 12, 2017

Member

That doesn't looks too bad indeed!

@jrudolph

LGTM, I added a few more comments to the Scaladoc. Could you add that to the commit?

jonas added some commits May 18, 2017

+htt Support separation of route execution from checking in the Java DSL
Port the ScalatestRouteTestSpec to JUnitRouteTestTest and move await of
the route result from RouteTest to TestRouteResult similar to how the
Scala RouteTest works. This breaks binary compatibility of the testkit,
however, no guarantees are given for that part of the Akka HTTP API.

Preliminary work needed to implement the Java API for #39 (integration
route testing).
Add a runWithRejections method to the Java TestRoute API
Allows to run the request against the semi-sealed route, i.e. without
default handling of rejections.
Add more comprehensive description of the TestRoute run methods
Document in greater detail the difference between `run` and
`runWithRejections`.
@jonas

This comment has been minimized.

Show comment
Hide comment
@jonas

jonas Aug 30, 2017

Member

Thanks @jrudolph for the improved and detailed documentation. Integrated to also link in the Javadoc version and rebased the branch.

screen shot 2017-08-30 at 3 59 10 pm

Member

jonas commented Aug 30, 2017

Thanks @jrudolph for the improved and detailed documentation. Integrated to also link in the Javadoc version and rebased the branch.

screen shot 2017-08-30 at 3 59 10 pm

@jonas

This comment has been minimized.

Show comment
Hide comment
@jonas

jonas Aug 31, 2017

Member

PLS BUILD

Member

jonas commented Aug 31, 2017

PLS BUILD

@akka-ci

This comment has been minimized.

Show comment
Hide comment
@akka-ci

akka-ci Aug 31, 2017

Collaborator

Test PASSed.

Collaborator

akka-ci commented Aug 31, 2017

Test PASSed.

@jrudolph

This comment has been minimized.

Show comment
Hide comment
@jrudolph

jrudolph Sep 11, 2017

Member

Thanks a lot, @jonas!

Member

jrudolph commented Sep 11, 2017

Thanks a lot, @jonas!

@jrudolph jrudolph merged commit 64871ef into akka:master Sep 11, 2017

3 checks passed

Jenkins PR Validation Test PASSed.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
typesafe-cla-validator All users have signed the CLA
Details

@jonas jonas deleted the jonas:junit-route-test-async branch Sep 11, 2017

@jonas

This comment has been minimized.

Show comment
Hide comment
@jonas

jonas Sep 11, 2017

Member

Thanks, will try to find some time to update the docs now that #1404 is merged.

Member

jonas commented Sep 11, 2017

Thanks, will try to find some time to update the docs now that #1404 is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment