Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
ad1ed3e2
Commit
ad1ed3e2
authored
Jul 08, 2010
by
Max Kanat-Alexander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 577538: Mark certain tests in xt/search.t as being broken only on Pg
(and a few as being not broken at all on Pg). r=mkanat, a=mkanat (module owner)
parent
ab9511d8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
1 deletion
+32
-1
Constants.pm
xt/lib/Bugzilla/Test/Search/Constants.pm
+24
-0
FieldTest.pm
xt/lib/Bugzilla/Test/Search/FieldTest.pm
+8
-1
No files found.
xt/lib/Bugzilla/Test/Search/Constants.pm
View file @
ad1ed3e2
...
...
@@ -45,6 +45,7 @@ our @EXPORT = qw(
NUM_SEARCH_TESTS
OR_BROKEN
OR_SKIP
PG_BROKEN
SKIP_FIELDS
SUBSTR_SIZE
TESTS
...
...
@@ -482,6 +483,29 @@ use constant KNOWN_BROKEN => {
},
};
# This tracks things that are broken in different ways on Pg compared to
# MySQL. Actually, in some of these cases, Pg is behaving correctly
# where MySQL isn't, but the result is still a bit surprising to the user.
use
constant
PG_BROKEN
=>
{
'attach_data.thedata'
=>
{
allwords
=>
{
},
allwordssubstr
=>
{
},
anywords
=>
{
},
notregexp
=>
{
contains
=>
[
5
]
},
nowords
=>
{
contains
=>
[
5
]
},
},
percentage_complete
=>
{
'allwordssubstr-<1>'
=>
{
contains
=>
[
3
]
},
anywordssubstr
=>
{
contains
=>
[
2
,
3
]
},
casesubstring
=>
{
contains
=>
[
3
]
},
'notregexp-<1>'
=>
{
contains
=>
[
3
]
},
notsubstring
=>
{
contains
=>
[
3
]
},
nowordssubstr
=>
{
contains
=>
[
3
]
},
'regexp-<1>'
=>
{
contains
=>
[
3
]
},
substring
=>
{
contains
=>
[
3
]
},
},
};
#############
# Overrides #
#############
...
...
xt/lib/Bugzilla/Test/Search/FieldTest.pm
View file @
ad1ed3e2
...
...
@@ -184,8 +184,15 @@ sub _known_broken {
my
$type
=
$self
->
field_object
->
type
;
my
$operator
=
$self
->
operator
;
my
$value
=
$self
->
main_value
;
my
$value_name
=
"$operator-$value"
;
if
(
Bugzilla
->
dbh
->
isa
(
'Bugzilla::DB::Pg'
))
{
my
$field_broken
=
PG_BROKEN
->
{
$field
}
->
{
$operator
};
return
$field_broken
if
$field_broken
;
my
$pg_value_broken
=
PG_BROKEN
->
{
$field
}
->
{
$value_name
};
return
$pg_value_broken
if
$pg_value_broken
;
}
my
$value_broken
=
KNOWN_BROKEN
->
{
$value_name
}
->
{
$field
};
$value_broken
||=
KNOWN_BROKEN
->
{
$value_name
}
->
{
$type
};
return
$value_broken
if
$value_broken
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment