Jody Garnett wrote:
> Ben Caradoc-Davies wrote:
> We need to have something to vote on - ie a policy change on the 
> handling of online tests. The result should be a change to the 
> developers guide (and possibly some fixes to the OnlineTestCase base class?

If we change anything (see below), I will write a formal proposal.

>> Perhaps either:
>> (1) an isServiceAvailable() method that subclasses can implement to 
>> see if the test should be skipped, or
>> (2) a subclass EasilyDisheartenedOnlineTestCase that gives up silently 
>> if connect() fails.
> I like the Subclass option *much* better; it will be easier to document 
> and understand.

I agree.

> So can we come up with a better name? What makes it 
> special for me is that it has a Fixture; for a lot of the other "online" 
> tests the fixture acts as an override ...
> So how about:
> - OnlineTestCase - super class to use when testing against an online 
> server like www.refractions.net for PostGIS. These tests are only there 
> to test conformance (so if the server is down the test cannot be run; 
> and it is not worth annoying developers with failure).
> - FixtureTestCase - super class to use that offers a test fixture 
> configured based on settings stored in the home directory. These tests 
> are there to abuse a local database or webserver and basically represent 
> test cases that require a server to run.

That sounds good. I wrote a long rebuttal and then realised I agreed 
with you.  :-)

How about (apologies for the ASCII-UML):

     TestCase <|-- FixtureTestCase <|-- OnlineTestCase

That is, we introduce FixtureTestCase as an intermediate extension point 
between TestCase and OnlineTestCase, and pull up all the fixture 
handling into FixtureTestCase. If you are happy that all OnlineTestCases 
are types of fixtures, we can have the exception-swallowing added in 
OnlineTestCase only. Users of OnlineTestCase are none-the-wiser, new 
tests can choose to fail on bad connect() [by extending 
FixtureTestCase], and everyone is happy. The manual can be updated to 
reflect the new class as an option.

How does this sound?

I'll implement it, and if it works for me, I'll propose it.

-- 
Ben Caradoc-Davies <[EMAIL PROTECTED]>
Software Engineer, CSIRO Exploration and Mining
Australian Resources Research Centre
26 Dick Perry Ave, Kensington WA 6151, Australia

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to