You need to sign in to do that
Don't have an account?
Christianralph
Testing SOQL Limits
When constructing a dynamic SOQL query, the Limit does not seem to work in test code, but it does work in production code.
Please see question posted on StackOverflow
http://stackoverflow.com/questions/3998037/soql-limit-clause-not-working-in-dynamic-query-using-like
Note: I have renamed the link. Please read here;
http://stackoverflow.com/questions/3998037/limit-not-working-when-testing-dynamic-soql
thanks
Christian
I tested dynamic SOQL in the test method with a limit clause and it worked fine without any issues.
I suggest you to put some system.debug prior to assertion to check the size of the accounts list returned.
Hope this way you will come to know whats happening.
Thanks for the reply..
yes I tried this and the size() of the results set is 6000+ records.