Ahh wait.. I confused the issue. I haven't stored any data in my unit tests, so actually I don't have a solution. Sorry about that. (I was thinking of running dev environment when running GWT code...)
On May 20, 11:19 am, Ravi <[email protected]> wrote: > no for me it can store any where, i dont care. > I did commented this line > testLocalDatastoreServiceTestConfig.setBackingStoreLocation("C:\ > \test.bin"); > > but it still didn't work.It gave the same line that file do not exists > in the path(war/WEB-INF/appeninge-generated/local_db.bin ) you just > mentioned and it will create new one, but it never created this file. > I know in memory data is proper but it never get persisted and my > subsequent test cases can not use it. > > Can you please send me your example which you are running so that i > can see if i am missing anything. > > Thanks, > Ravi > > On May 20, 3:50 pm, Tristan <[email protected]> wrote: > > > > > > > Is there a specific reason you need to store your data in that > > particular place? I never specified storage and it automatically > > created one for me and it persists just fine in war/WEB-INF/appeninge- > > generated/local_db.bin > > > On May 20, 5:41 am, Ravi <[email protected]> wrote: > > > > Sorry to send a mail again. But can any one please help. I tried > > > searching on group but didnt found a a solution till now. > > > > Main problem is that data is not being persisted on file system. > > > If you have any example which works(example on Google docs doesnt > > > work, i have tried that) then please send it to me. > > > > Thanks, > > > Ravi. > > > > On May 19, 7:55 am, Ravi <[email protected]> wrote: > > > > > Finally found the problem that in documentation its not mentioned that > > > > few of the jars need to be included. They did mention few but not all, > > > > may be documentation need to be fixed. > > > > So it worked now. but now getting another problem, data is not being > > > > persisted in local file. I am using following code > > > > testLocalDatastoreServiceTestConfig = new > > > > LocalDatastoreServiceTestConfig(); > > > > > > > > testLocalDatastoreServiceTestConfig.setBackingStoreLocation("C:\ > > > > \test.bin"); > > > > testLocalDatastoreServiceTestConfig.setNoStorage(false); > > > > testHelper = new > > > > LocalServiceTestHelper(testLocalDatastoreServiceTestConfig); > > > > > It tells me > > > > The backing store, c:\test.bin, does not exist. It will be created. > > > > But it is never created and i can see through logs that entity i > > > > created was actually worked as i could print Key id field of it. which > > > > comes as User(1), but then i can not query it using Id or any other > > > > field as it was never persisted on file system. > > > > > Can you please help. I am using SDK 1.3.3 > > > > > Thanks, > > > > Ravi. > > > > > On May 18, 8:25 pm, Ravi Sharma <[email protected]> wrote: > > > > > > Hi, > > > > > First time i am trying to run localjunittestin eclipse. I am following > > > > > exactly what is written > > > > > herehttp://code.google.com/appengine/docs/java/tools/localunittesting.html > > > > > > but no use, i am getting following error. > > > > > > com.google.apphosting.api.ApiProxy$CallNotFoundException: The API > > > > > package > > > > > 'datastore_v3' or call 'RunQuery()' was not found. > > > > > at > > > > > com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.call( > > > > > ApiProxyLocalImpl.java:284) > > > > > at > > > > > com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.call( > > > > > ApiProxyLocalImpl.java:264) > > > > > at > > > > > java.util.concurrent.Executors$PrivilegedCallable$1.run(Executors.java:463) > > > > > at java.security.AccessController.doPrivileged(Native Method) > > > > > at > > > > > java.util.concurrent.Executors$PrivilegedCallable.call(Executors.java:460) > > > > > at > > > > > java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)Query > > > > > Ran > > > > > Succesfully > > > > > Returning results > > > > > Tear Down > > > > > > at java.util.concurrent.FutureTask.run(FutureTask.java:138) > > > > > at > > > > > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.j > > > > > ava:886) > > > > > at > > > > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java: > > > > > 908) > > > > > at java.lang.Thread.run(Thread.java:619) > > > > > > I searched on GAE group and found few things like i need to include > > > > > following code in the setup and tear method. I dont see these > > > > > methodas in > > > > > documentation.. Also i tried to add in my code but then i dont find > > > > > in app > > > > > engine jars. So dont know what to do. > > > > > > ApiProxy.setEnvironmentForCurrentThread(new TestEnvironment()); > > > > > and > > > > > ApiProxy.setDelegate(new ApiProxyLocalImpl(new File(".")){}); > > > > > (Taken from this > > > > > linkhttp://groups.google.com/group/google-appengine-java/browse_thread/th... > > > > > (Max Ross's Reply)) > > > > > > Is any thing missing on Docs on this > > > > > linkhttp://code.google.com/appengine/docs/java/tools/localunittesting.html, > > > > > as i > > > > > am following it exactly written or may be my eyes are not able to > > > > > find what > > > > > i am missing. > > > > > > Please help. > > > > > > Thanks, > > > > > Ravi. > > > > > > -- > > > > > You received this message because you are subscribed to the Google > > > > > Groups "Google App Engine for Java" group. > > > > > To post to this group, send email to > > > > > [email protected]. > > > > > To unsubscribe from this group, send email to > > > > > [email protected]. > > > > > For more options, visit this group > > > > > athttp://groups.google.com/group/google-appengine-java?hl=en. > > > > > -- > > > > You received this message because you are subscribed to the Google > > > > Groups "Google App Engine for Java" group. > > > > To post to this group, send email to > > > > [email protected]. > > > > To unsubscribe from this group, send email to > > > > [email protected]. > > > > For more options, visit this group > > > > athttp://groups.google.com/group/google-appengine-java?hl=en. > > > > -- > > > You received this message because you are subscribed to the Google Groups > > > "Google App Engine for Java" group. > > > To post to this group, send email to > > > [email protected]. > > > To unsubscribe from this group, send email to > > > [email protected]. > > > For more options, visit this group > > > athttp://groups.google.com/group/google-appengine-java?hl=en. > > > -- > > You received this message because you are subscribed to the Google Groups > > "Google App Engine for Java" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > For more options, visit this group > > athttp://groups.google.com/group/google-appengine-java?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine for Java" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group > athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
