diff options
author | Dave Lawrence <dlawrence@mozilla.com> | 2013-02-26 21:57:37 +0100 |
---|---|---|
committer | Dave Lawrence <dlawrence@mozilla.com> | 2013-02-26 21:57:37 +0100 |
commit | 5ccff95a61b0c0816fa42da061c298f794daf33d (patch) | |
tree | 2b46e295fb29bcd57afd6c8532001290d82ec953 /xt/lib/Bugzilla | |
parent | 8555ab1f12abd53744d0cb4fe9b3d7a925b10194 (diff) | |
download | bugzilla-5ccff95a61b0c0816fa42da061c298f794daf33d.tar.gz bugzilla-5ccff95a61b0c0816fa42da061c298f794daf33d.tar.xz |
Bug 836067 - backport bug 819432 to BMO 4.2 to improve search performance
Diffstat (limited to 'xt/lib/Bugzilla')
-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; } |