JUnit - Scout [message #1843271] |
Thu, 22 July 2021 09:37 |
Mr Robot Messages: 72 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
|
|
|
Powered by
FUDForum. Page generated in 0.03013 seconds