From: | "David E(dot) Wheeler" <david(at)kineticode(dot)com> |
---|---|
To: | Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov> |
Cc: | "Peter Eisentraut" <peter_e(at)gmx(dot)net>, <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Testing with concurrent sessions |
Date: | 2010-01-06 22:09:39 |
Message-ID: | 5AA595C4-89DE-40AC-8DE0-0BC694C244ED@kineticode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Jan 6, 2010, at 1:52 PM, Kevin Grittner wrote:
>> Last I heard, Andrew was willing to require Test::More for
>> testing, so that a Perl script could handle multiple psql
>> connections (perhaps forked) and output test results based on
>> them. But he wasn't as interested in requiring DBI and DBD::Pg,
>> neither of which are in the Perl core and are more of a PITA to
>> install (not huge, but the barrier might as well stay low).
>
> OK, I've gotten familiar with Perl as a programming language and
> tinkered with Test::More. What's not clear to me yet is what would
> be considered good technique for launching several psql sessions
> from that environment, interleaving commands to each of them, and
> checking results from each of them as the test plan progresses. Any
> code snippets or URLs to help me understand that are welcome. (It
> seems clear enough with DBI, but I'm trying to avoid that per the
> above.)
Probably the simplest way is to use the core IPC::Open3 module:
http://search.cpan.org/perldoc?IPC::Open3
IPC::Run might be easier to use if it's available, but it's not in Perl core, so YMMV. Really it's up to andrew what modules he requires test servers to have.
Best,
David
From | Date | Subject | |
---|---|---|---|
Next Message | David E. Wheeler | 2010-01-06 22:10:15 | Re: Testing with concurrent sessions |
Previous Message | Peter Eisentraut | 2010-01-06 22:08:29 | Re: Testing with concurrent sessions |