[Rd] CRAN - db backend testing

Paul Gilbert pgilbert at bank-banque-canada.ca
Mon Nov 24 17:48:03 CET 2008


(thread renamed from Re: [R-sig-DB] RMySQL release candidate 0-7.0)

Building on Uwe's comments and my own thoughts I suggest variables like 
SKIP_POSTGRESQL, SKIP_MYSQL, SKIP_SQLITE, SKIP_ORACLE, SKIP_ODBC, 
SKIP_FAME be used to signal that tests should not be run. If these are 
not set to something then the tests will be attempted, so skipping the 
tests is not likely to happen by accident. This would also clearly 
separate the mechanism for deciding if the tests should be run from the 
mechanism for determining details like the userid. The tests files would 
then have something like

  if ((Sys.getenv("SKIP_POSTGRESSQL") == "")) { tests }

Then, if variables like POSTGRES_USER, POSTGRES_HOST, POSTGRES_DATABASE 
(more on DATABASE below) are found they will be used, otherwise nothing 
is specified and the drivers will typically read values from 
configuration files like .my.cnf and .pgpass.

It would be nice to have a mechanism for examples, vignettes, and demos, 
  but I don't see any nice way to do this.

Paul Gilbert wrote:
>> However, there is still a problem of potential conflicts on database 
>> "test" if parallel testing occurs. (I've had this problem already.) It 
>> would be better if "test" were replaced by a pid specific db, but this 
>> requires the userid to have database create rights. 
> 
Uwe Ligges wrote:
> At least I will try to avoid checking of more than one RMySQL instance ....

This does not solve the problem, since one server instance can respond 
to multiple clients. So, if odbc and RPostgreSQL  both talk to the same 
PostgreSQL server and use the database "test" they can collide (fairly 
easily if packages are testing similar functionality with different 
drivers).  This problem is even more severe when testing on multiple 
clients with a single server, which is a problem for my own testing but 
may not be for CRAN.

Paul
====================================================================================

La version française suit le texte anglais.

------------------------------------------------------------------------------------

This email may contain privileged and/or confidential in...{{dropped:26}}



More information about the R-devel mailing list