From pgilbert at bank-banque-canada.ca  Mon Nov 24 17:48:03 2008
From: pgilbert at bank-banque-canada.ca (Paul Gilbert)
Date: Mon, 24 Nov 2008 11:48:03 -0500
Subject: [Rd] CRAN - db backend testing
In-Reply-To: <49253B79.5000907@statistik.tu-dortmund.de>
References: <491CA2B0.6000204@vanderbilt.edu>
	<alpine.LFD.2.00.0811140721240.15986@gannet.stats.ox.ac.uk>
	<alpine.LFD.2.00.0811160955180.20094@gannet.stats.ox.ac.uk>
	<18720.17441.551053.30889@ron.nulle.part>
	<4921906E.5000103@bank-banque-canada.ca>
	<alpine.LFD.2.00.0811171546290.9915@gannet.stats.ox.ac.uk>
	<49219544.20402@bank-banque-canada.ca>
	<alpine.LFD.2.00.0811171614010.10696@gannet.stats.ox.ac.uk>
	<4921A81D.9070300@bank-banque-canada.ca>
	<4922875B.9060601@statistik.tu-dortmund.de>
	<49234355.4030303@bank-banque-canada.ca>
	<49253B79.5000907@statistik.tu-dortmund.de>
Message-ID: <492ADAC3.1040506@bank-banque-canada.ca>

(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}}



[Rd] CRAN - db backend testing
Paul Gilbert