On Fri, Jul 20, 2012 at 01:39:34PM -0400, Alvaro Herrera wrote:
> Excerpts from Noah Misch's message of mar jul 17 16:28:32 -0400 2012:
> > The foreign key tests, however, would benefit
> > from running under all three isolation levels.  Let's control it per-spec
> > instead of repeating the entire suite.
> 
> Understood and agreed.  Maybe we could use a new directive in the spec
> file format for this.

I was pondering something like this:

        setting "i-rc" "isolation" = "READ COMMITTED"
        setting "i-rr" "isolation" = "REPEATABLE READ"

        session "s1"
        setup           { BEGIN TRANSACTION ISOLATION LEVEL :isolation; }
        step "foo"      { SELECT 1; }

        permutation "i-rc" "foo"
        permutation "i-rr" "foo"

That is, introduce psql-style variable substitutions in per-session "setup",
"step" and "teardown" directives.  Introduce the "setting" directive to
declare possible values for each variable.  Each permutation may name settings
as well as steps.  Order within the permutation would not matter; we could
allow them anywhere in the list or only at the beginning.  When the tester
generates permutations, it would include all variable setting combinations.

Thoughts?

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to