1) First up the database is dropped/recreated from fresh schema with seed data
2) Next an embedded ApacheDS LDAP server is started and our LDAP
schema loaded with seed LDAP data
3) An OSGi container is started and bundles deployed
4) Main tests run
At any point of 1, 2, 3 failing is potentially a pre-condition fail
for the main tests. Those tests would be red, but the rest (under
TestNG) go yellow for skipped.
--
Pull me down under...
Well, looking at a few "test failures" we've had in the past:
- PostgreSQL was unable to drop/recreate the database due to a
lingering open transaction from an earlier aborted test run. This
means having to log in and run "rollback prepared '${transactionid}'".
Doesn't happen often, but has happened a few times.
- Database Server is out of disk space so unable to create db -
again, doesn't happen often but has happened.
- Problems elsewhere in the network caused the iSCSI filesystem used
by the build server to become READ-ONLY - so also unable to create
databases
In these cases the "tests" never ran, so is definitely an
environmental precondition failure.
--
Pull me down under...
On Sat, Jul 24, 2010 at 12:52 PM, mP <miroslav...@gmail.com> wrote:
> Im not sure, if your response is a good example that backs the need
> for preconditions. Most (all?) of the 4 steps that you describe should
> always work if one assumes that the db is some local (im memory etc).
> I would say that the above should always work but introducing some
> precondition to just ignore them because its tricky or hard is a bad
> way to write reliable reproducable tests.
>
So whats the concensus ?
4 different people, 3 different comments :)