Since we have more targeted platforms than DSO now, we've decided to put a new test framework in place that would enable developers to run tests as easily as possible in all 3 environments: Custom, Express and "standalone" (i.e. no clustering). The way I've started this is that tests are simple junit tests that need to be annotated with @TerracottaTest like this:
@RunWith(TerracottaRunner.class) // Still trying to get rid of this guy here! @TerracottaTest public class usefulTest { @Test public void testSomethingUseful() { } } By default, this would result in the test being run in all 3 environments. One could influence this by specifying the targeted environments as: @TerracottaTest({TargetEnvironment.EXPRESS, TargetEnvironment.CUSTOM}) The annotation currently also takes an additional parameter, participants:int, which defaults to 2 Now in order to orchestrate these participants, one would generally rely on a j.u.c.CyclicBarrier... which would be obtained by a ClusteringProvider.getBarrier("myBarrier", 2); In order to get to the appropriate ClusteringProvider, I was thinking about injecting it in the test through the mean of some annotated field. Should the test be in "standalone" (i.e. 2 threads running the "classpath isolated" test), I'd inject some DummyPersistenceProvider. This makes the most sense to me right now, wdyt? Thanks, Alex _______________________________________________ tc-dev mailing list tc-dev@lists.terracotta.org http://lists.terracotta.org/mailman/listinfo/tc-dev