Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Integration testing with Eclipse Scout
Integration testing with Eclipse Scout [message #1829118] Thu, 25 June 2020 11:58
Mark Ashworth is currently offline Mark AshworthFriend
Messages: 40
Registered: January 2012
Member
Good day,

After performing unit tests on the classes, I need to write some integration tests that pull data from a test database and then make sure that the code is working.

I have tried to do this in multiple different ways but I think it comes down to the test not knowing when to shutdown the server session.

I have used the following test annotations.

@RunWithSubject("anonymous")
@RunWith(ServerTestRunner.class)
@RunWithServerSession(ServerSession.class)


I then perform some database operation.

BEANS.get(ISqlService.class)
		.selectInto(
				DB.SELECT_INTO_OBJECT, 
				new NVPair("object", messages));


An then the unit test hangs for some time after test completion and then reports the following exception.

java.lang.AssertionError: Test failed because some jobs did not complete yet. [context=Test method, jobs=[Managing SQL connection pool for xx.xx.xx.rose.server.sql.SqlService]]
	at org.junit.Assert.fail(Assert.java:88)
	at org.eclipse.scout.rt.testing.platform.runner.statement.AssertNoRunningJobsStatement.assertNoRunningJobs(AssertNoRunningJobsStatement.java:86)



How can I shut down the server session in a way that accommodates whether I am executing 1 or multiple tests as part of a batch. I have found that if I resolve it for a single unit test that the unit tests fail when executing them as part of a Maven build.

Kind regards,
Mark Ashworth
Previous Topic:Scout Lazy Loading & Custom Themes
Next Topic:A Nullpointer exception in Eclipse Scout IDE 2010-Mars
Goto Forum:
  


Current Time: Tue Apr 23 12:28:57 GMT 2024

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

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

Back to the top