diff options
author | Dave Lawrence <dlawrence@mozilla.com> | 2013-02-27 15:55:50 +0100 |
---|---|---|
committer | Dave Lawrence <dlawrence@mozilla.com> | 2013-02-27 15:55:50 +0100 |
commit | 0c6d95615195a455b9c4bfc0242a7690f5a881ab (patch) | |
tree | 281e7a8d7a802fdf0c88de8dd7e9d14b7ba44dec /xt/lib | |
parent | d388c8203d3fb1f2f97569dd9dbdffcd5acc8aa2 (diff) | |
download | bugzilla-0c6d95615195a455b9c4bfc0242a7690f5a881ab.tar.gz bugzilla-0c6d95615195a455b9c4bfc0242a7690f5a881ab.tar.xz |
Bug 836067 - backport bug 819432 to BMO 4.2 to improve search performance
Diffstat (limited to 'xt/lib')
-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 283a90d16..bd5fd905a 100644 --- a/xt/lib/Bugzilla/Test/Search/FieldTest.pm +++ b/xt/lib/Bugzilla/Test/Search/FieldTest.pm @@ -544,13 +544,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); @@ -567,12 +567,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; } |