[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Failing tests after changes in HttpSessionAccess after CC update to 20200303  XML
Forum Index -> Development
Author Message
heyl

Power User

Joined: 10/01/2008 09:41:55
Messages: 267
Location: Ettlingen
Offline

Hi,

after updating to version 20200303 we have the following problem:

We have some tests that mock the FacesContext properly with HttpServletRequests and all.
But we have others that use the static flag UsageWithoutSessionContext.isUsedWithoutSessionContext().

This flag is never reset, once it was set. So if we run the test with the mock afterwards, HttpSessionAccess.getCurrentRequest() and HttpSessionsAccess.getCurrentResponse() return null, instead of the mocked Http request and response as it was before.


Best regards
Frauke
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5518
Offline

...got it... + just checking... - Björn

Björn Müller, CaptainCasa GmbH
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5518
Offline

Hi Frauke,

we fixed this and adapted the behavior, so that your mock is "respected". Is part of next update (begin of next week) or immediately on your request.

Sorry + thanks! Björn

Björn Müller, CaptainCasa GmbH
heyl

Power User

Joined: 10/01/2008 09:41:55
Messages: 267
Location: Ettlingen
Offline

Hi Björn,

thanks for the quick correction. This part now works. But we have another failure, when some test before adds a ThreadData context.

I found out that is done by:
Code:
 YESNOPopup popupInstance = YESNOPopup.createInstance(title, text, yesNoListener);
 

ThreadData is never released and our test now fails because ThreadData doesn't have an HttpRequest. See also in HttpSessionAccess, same methods as before.

Best regards
Frauke
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team