Junit and datastore-indexes.xml

43 views
Skip to first unread message

Rajesh Gupta

unread,
Aug 16, 2016, 3:14:43 AM8/16/16
to google-a...@googlegroups.com
Hi,

I am running the junit tests.  Is there a way to specify the datastore-indexes.xml file for the junit tests

What I meant, when the running the junit, the code should throw DatastoreIndexNotFoundException if there is no index in the datastore-indexes.xml.

What is happening for us is, we run the tests and the tests are green.  But when the same code gets executed in the server, it throws DatastoreIndexNotFoundException 

-- 
Regards,
Rajesh
Accounting/Inventory/Orders on Google Cloud Platform and Mobile

Alexey

unread,
Aug 18, 2016, 12:43:07 AM8/18/16
to Google App Engine
Assuming you're using LocalServiceTestHelper and LocalDatastoreServiceTestConfig, I would suggest tweaking noIndexAutoGen:

new LocalServiceTestHelper(new LocalDatastoreServiceTestConfig.setNoIndexAutoGen(true))
Reply all
Reply to author
Forward
0 new messages