diff options
author | Frédéric Buclin <LpSolit@gmail.com> | 2013-01-16 19:05:22 +0100 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2013-01-16 19:05:22 +0100 |
commit | d8643908a7d6243c361e670573af763067db408d (patch) | |
tree | b8e5b5df199351e6455843fc27a4c4e1e30433d9 /xt | |
parent | 7b6b9a789a2bfc5707ba1eb85ad7ba5245af64a3 (diff) | |
download | bugzilla-d8643908a7d6243c361e670573af763067db408d.tar.gz bugzilla-d8643908a7d6243c361e670573af763067db408d.tar.xz |
Bug 819432: Execute queries in two steps to improve performance
r=dkl a=LpSolit
Diffstat (limited to 'xt')
-rw-r--r-- | xt/lib/Bugzilla/Test/Search/FieldTest.pm | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/xt/lib/Bugzilla/Test/Search/FieldTest.pm b/xt/lib/Bugzilla/Test/Search/FieldTest.pm index f8295aa70..c92a6a7b6 100644 --- a/xt/lib/Bugzilla/Test/Search/FieldTest.pm +++ b/xt/lib/Bugzilla/Test/Search/FieldTest.pm @@ -530,13 +530,13 @@ sub do_tests { my $sql; TODO: { local $TODO = $search_broken if $search_broken; - lives_ok { $sql = $search->sql } "$name: generate SQL"; + lives_ok { $sql = $search->_sql } "$name: generate SQL"; } my $results; SKIP: { skip "Can't run SQL without any SQL", 1 if !defined $sql; - $results = $self->_test_sql($sql); + $results = $self->_test_sql($search); } $self->_test_content($results, $sql); @@ -553,12 +553,11 @@ sub _test_search_object_creation { } sub _test_sql { - my ($self, $sql) = @_; - my $dbh = Bugzilla->dbh; + my ($self, $search) = @_; my $name = $self->name; my $results; - lives_ok { $results = $dbh->selectall_arrayref($sql) } "$name: Run SQL Query" - or diag($sql); + lives_ok { $results = $search->data } "$name: Run SQL Query" + or diag($search->_sql); return $results; } |