On 22/11/12 15:17, bugzi...@apache.org wrote:
https://issues.apache.org/bugzilla/show_bug.cgi?id=54190
--- Comment #2 from Mark Thomas <ma...@apache.org> ---
testBasicLoginWithoutSession() seems to repeat the same pair of tests but the
comments suggest that something different should happen the second time. What
am I missing?
Thanks for looking at my change so carefully and quickly.
You are not missing anything, Mark. Perhaps my comments section could be
clearer.
That particular test demonstrates something that I am sure you consider
obvious... tc does not have any mechanism for "remembering" the client's
successful authentication. The third call to doTestBasic, without
providing any credentials, gets the 401 status because the server didn't
have a cached session.
The only reason I coded that explicit 401/200/401/200 sequence was to
make it obviously and directly comparable with
testBasicLoginSessionPersistence, which gets 401/200/200/200.
Strictly speaking, I suppose the fourth doTestBasic is redundant, the
third is a bit like stating the obvious, and then the whole of
testAcceptProtectedBasic could be considered to be a duplicate.
Nevertheless, the only test that takes any time at all is the one that
involves a session timeout.
My main motive for "dotting the i's" was to make the behaviour clear to
a third person who might be trying to understand the way it works.
Do you prefer to make the comments clearer, or take out the redundant logic?
Brian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org