By failing to prepare, you are preparing to fail.<br />Benjamin Franklin (1706 - 1790)
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
By failing to prepare, you are preparing to fail.<br />Benjamin Franklin (1706 - 1790)
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
By failing to prepare, you are preparing to fail.<br />Benjamin Franklin (1706 - 1790)
Originally posted by Jeanne Boyarsky:
Dale,
We use local developer copies of the database and therefore don't have this problem. But I do have a few thoughts.
1) Are you using different databases or different schemas? Different schemas would make the problem slightly less. Different database may require datasource changes as well.
2) Why can't you give each developer a test schema? Test databases are typically small. (This solves problem 1.) There are only a few people on my team too, but we'd run into tons of conflicts if we had to share tables. Reproduceable tests are so important that this is worth the small cost.
3) You could provide a method to clear out the cached value in the property file. Just have your tests call that method before running (This solves problem 2.) I've done this in the past for other property files and it works well.
I definitely wouldn't pass the database name into the data access layer. Further, it wouldn't help solve either of these problems. It would just move them further up.
By failing to prepare, you are preparing to fail.<br />Benjamin Franklin (1706 - 1790)
Originally posted by Dale DeMott:
How would you clear out the cached version considering this is a singleton? Do all tests do this or is it something that the test suite does?
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2