Christopher Armstrong
unread,Jul 10, 2012, 4:10:40 PM7/10/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-a...@googlegroups.com
Hello,
I'm using Eclipse Indigo with the AppEngine Plugin. I have implemented a DAO Layer for AppEngine and JUnit tests with datastore with LocalServiceTestHelper are running perfectly, by implementing the helper method in to the Before and After annotations (helper.setUp(), helper.tearDown()).
Now I built a webservice layer. A CardResource Class which I now want to test. So once I run my JUnit Test in Eclipse and process the JUnit CardResourceTest Class the CardResourceTest Class must start a webcontainer together with the LocalServiceTestHelper in order to test the CardResource Class. At the end of the test the webcontainer should be closed again.
But I get following error back from AppEngine after setting of my client request to the webservice:
No API environment is registered for this thread.
This is because the webcontainer seems to spawn new threads which is not allowed in the sandbox (tried with Grizzly and Jetty).
How can I load a webcontainer and the LocalServiceTestHelper with JUnit to test my webservice and close everything again on my sandbox after the test completed without the spawning of new threads?
I haven't been figuring this out in a week. And I can't proceed with development before I found a way to successfully test my webservices.
I appriciate any help.
Kind regards,
Chris