Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-dev] recommended ways to exclude tests from LRG/SRG

Also, how do I skip a whole suite (TestModel)?

I'd like to skip the following one completely as Symfoware doesn't allow spaces in table names so none of its tests will pass.


I can't put an isSymfoware() around the tests.add method in because the session is not initialized at this moment.


On 21/01/2010 18:07, Dies Koper wrote:

What's the recommended way to skip tests in the LRG and SRG test sets
that won't run on a platform because of a documented limitation (of
either EclipseLink/platform class or the db/driver itself)?

I have been trying to follow what's being done so far but there seem to
be different ways.

For example, we have simple returns with a log message:

     if (!(dbPlatform.isOracle() || dbPlatform.isMySQL() ||
dbPlatform.isPostgreSQL() || dbPlatform.isSymfoware())) {
         getServerSession().logMessage("Test testLeftTrimWithTrimChar
skipped for this platform");

And we have TestWarningExceptions:

     if (getSession().getPlatform().isTimesTen() ||
getSession().getPlatform().isSymfoware()) {
          throw new TestWarningException("This test is not supported on
this platform.");

And Assert,assertFalse():

     Assert.assertFalse("Warning Sybase Driver does not work with
DriverWrapper, testEMCloseAndOpen can't run on this platform.",

Are there any rules for when to use which?


Back to the top