ALTERthought Blogs

ALTERthought Blogs Archives: Persistence

·

5 September 2008

Grails Testing Tip (DO’s, DONT’s and DOH’s): Fixture Data vs. Dependent Data

DO: Distinguish between Fixture Data and Dependent Data
Integration testing can be painful enough under the best of circumstances. Confusion around where data comes from, when it should be deleted, rolled back or committed can derail the even the best laid plans. (This is especially true in more complicated projects that involve multiple datasources, that [...]

continue reading... » 0 Comments

26 August 2008

Grails Testing Tip (DO’s, DONT’s and DOH’s): The Clean Slate Principle

DO: Follow the Clean Slate Principle
Its happened to all of us, a test that was working just fine, suddenly starts failing because the test database was left in an unstable state. Enter the Clean Slate Principle.
Grails integration tests should endeavor to follow a simple rule:

Leave the database in the state in which you found it.
In [...]

continue reading... » 6 Comments

13 March 2006

Access denied error in MySQL

Have you been frustrated with Access denied for user ‘chinnu’@’localhost’ errors even though as root you granted following privileges:
GRANT ALL PRIVILEGES ON MyDb.* to ‘chinnu’@'%’ WITH GRANT OPTION;
While % means any host, you probably did not see the behavior you expected.
MySQL performs access control in two stages. First, it tries to connect you with the [...]

continue reading... » 0 Comments

·