Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » JUnit - Scout(How to write server tests)
JUnit - Scout [message #1843271] Thu, 22 July 2021 09:37
Mr Robot is currently offline Mr RobotFriend
Messages: 71
Registered: March 2020
Member
Hello,

is there an example how to write tests for backend? I saw example for contacts app on github, but when running simple test I have error:
Failed to lease connection for driver....

I can see that this error is throw on execLoadSession where app is loading data for current user and storing in session.

Here is code:
@Override
protected void execLoadSession() {
		LOG.info("created a new session for {}", getUserId());
		
		// Set current user
		User currentUser = 
                BEANS.get(ILoginService.class).getUserByUsername(getUserId());
		setCurrentUser(currentUser);

}


It is trying to fetch user from database to store it in session in LoginService, but when executing SQL.selectInto error is thrown.

How to fix this ?

Thank you

Previous Topic:Jersey/Jetty API Handler/Container resends the GET request every 1 min
Next Topic:Session on idle is null, no message box
Goto Forum:
  


Current Time: Wed May 08 21:52:11 GMT 2024

Powered by FUDForum. Page generated in 0.03402 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top