Configure JUnit test to suggest the missing datastore-indexes

53 views
Skip to first unread message

sarath upadrista

unread,
Apr 15, 2014, 6:26:02 AM4/15/14
to google-a...@googlegroups.com
Hello,
    I would like to know how the JUnit test uses the datastore-indexes while doing the queries.

     My problem is that, I would like to track the missing datastore-indexes using the JUnit test. Is there any way to give the indexes file as an input while configuring the datastore?

I don't want to use the auto datastore-indexes for my JUnit tests. 

What configuration can I make so that JUnit will be able to suggest what are the missing indexes?

--
Thanks & Regards
Sarath U

sarath upadrista

unread,
Apr 17, 2014, 6:49:00 AM4/17/14
to google-a...@googlegroups.com
Any suggestions for this.

 Basically I would like to know what are the required indexes while running JUnit tests?

Vinny P

unread,
Apr 22, 2014, 8:31:33 AM4/22/14
to google-a...@googlegroups.com
The development datastore generates all of the needed indexes, so as long as you're exercising every possible query there shouldn't be any missing indexes.

If you insist on testing for missing indexes, you can set setNoIndexAutoGen to turn off index generation and then attempt to call a query. If the query fails to complete, then the usual culprit is that the index is missing. You can confirm that by looking at the logs, or you can automate it by using the Logs API.
 
 
-----------------
-Vinny P
Technology & Media Advisor
Chicago, IL

App Engine Code Samples: http://www.learntogoogleit.com
 
 
Reply all
Reply to author
Forward
0 new messages