Skip to content

Migrate servlet tests to HttpServerTest and ignoreActiveSpan for "root" - #932

Merged
tylerbenson merged 4 commits into
masterfrom
tyler/servlet-testing
Aug 5, 2019
Merged

tylerbenson merged 4 commits into
masterfrom
tyler/servlet-testing

Conversation

@tylerbenson

@tylerbenson tylerbenson commented Jul 26, 2019 •

Copy link
Copy Markdown
Contributor

Currently missing the authentication tests which need to be added to the parent, but other than that, testing is more thorough.

Discovered that trace propagation for Jetty Async is currently busted so I commented that portion of the test out until we can get it fixed.

Also discovered that incorrect status code was being set on async dispatch and span was being finished too early.

Currently missing the authentication tests which need to be added to the parent, but other than that, testing is more thorough.

Discovered that trace propagation for Jetty Async is currently busted so I commented that portion of the test out until we can get it fixed.
@tylerbenson
tylerbenson requested a review from a team as a code owner July 26, 2019 23:03
@tylerbenson tylerbenson changed the title Migrate servlet tests to HttpServerTest Migrate servlet tests to HttpServerTest and ignoreActiveSpan for "root" Jul 26, 2019
This allows it to finish the span with the correct response.
@tylerbenson
tylerbenson force-pushed the tyler/servlet-testing branch 4 times, most recently from 910d5ff to 816408e Compare July 29, 2019 22:09
@tylerbenson
tylerbenson force-pushed the tyler/servlet-testing branch from 816408e to 9681b91 Compare July 29, 2019 22:28
@tylerbenson
tylerbenson requested a review from labbati July 29, 2019 22:38

@labbati labbati left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I like what we have done here. My main question is about authentication. I noticed we removed quite a few tests for it. Was this necessary just because this changes? What we can do to bring them back and how/when we plan to do it?

}

@WebServlet(asyncSupported = true)
static class BlockingAsync extends AbstractHttpServlet {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Isn't BlockAsync not worth testing anymore?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The two concepts are combined into the single async test.

}
}

// TODO: Add tests for this!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this a left over or we need to add tests for something?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

DispatchRecursive isn't being tested anymore. Think it's useful to still have?

servletContext.addServletMappingDecoded(path, name)
}

// FIXME: Add authentication tests back in...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same as above

@labbati labbati left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the changes. This looks good to me now.

@tylerbenson
tylerbenson merged commit 2aa69d8 into master Aug 5, 2019
@tylerbenson
tylerbenson deleted the tyler/servlet-testing branch August 5, 2019 15:35
@tylerbenson tylerbenson added this to the 0.32.0 milestone Aug 20, 2019
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.

2 participants