Write tests for non-date QueryConstraints
Reported by Ben Hood | 2010-11-17 15:45:11 UTC
In ticket #2, the test suite was ported to the QueryConstraint API. However, to reduce the scope of that bug, no new constraint tests were added. So it would be good to have some tests that perform narrowing using something other than date attributes.
Comments and changes to this ticket
-

Ben Hood 2011-01-07 18:05:22 UTC
- Assigned user set to Ben James
-

-

Ben James 2011-01-17 13:15:31 UTC
- State changed from open to resolved
- Assigned user changed from Ben James to Ben Hood
-

Ben Hood 2011-01-17 16:04:45 UTC
- Assigned user changed from Ben Hood to Ben James
Overall quite good, especially some of the functional based refactoring you've done in places.
QA notes:
-
IntegerCategoryFunction:
- Something to document the class would be nice.
- What about the TODO regarding the IllegalArgumentException? (InvalidCategoryException?)
- Stylistically I think we put brackets around if statements, even 1-liners
- L60: Why recompute the next denominator?
- L23-24: Why do you redefine these signatures?
- TensCategoryFunction et al: I don't if I would maintain these as symbols to go into the main assembly - they seem to just be used for testing purposes only.
-
ConfigStore:
- Why do the fields of the Pair class need to be nulled out? Equally, why does the implementation of the SortedMap need to be statically specified?
-
AbstractPolicyTest:
-
bizDateMap/bizDateSeq: Are these still required?
- Some of the indentation of function definitions is not inline
with current practice, e.g.
protected def shouldRaiseMatchEventWhenDownstreamCausesMatchOfUpstream( categories: Map[String, String], attributes: Seq[String], downstreamAttributes: Map[String, String] ) { - There are 8 tests in the old revisions and 14 in the new - should I be expecting 16 in the new version though?
-

Ben Hood 2011-01-17 17:27:22 UTC
(from [cd3e1e3d168217bae8a6cf05a9b6cd9cf3b4960c]) Throw InvalidCategoryException if parsing of the value fails [#149] https://github.com/lshift/diffa/commit/cd3e1e3d168217bae8a6cf05a9b6...
-

Ben Hood 2011-01-17 17:27:22 UTC
(from [e4a4dc81384d830cb520cb8332837cc38cc70423]) Test & implementation for integer partitioning [#149] https://github.com/lshift/diffa/commit/e4a4dc81384d830cb520cb833283...
-

Ben Hood 2011-01-17 17:27:25 UTC
(from [cde76d0071727471cec686a4da6c356cd5e11042]) Throw InvalidCategoryException if date can't be parsed from value [#149] https://github.com/lshift/diffa/commit/cde76d0071727471cec686a4da6c...
-

Ben Hood 2011-01-17 17:27:29 UTC
(from [a1c9962e123a58edbcdee4ee86b553f285af70c3]) Name the integer buckets according to order of magnitude [#149] https://github.com/lshift/diffa/commit/a1c9962e123a58edbcdee4ee86b5...
-

Ben Hood 2011-01-17 17:27:29 UTC
(from [c5e8971a5015bbd5882138c27076710920a706ee]) Add a unit test for DateCategoryFunction's descend [#149]
(This is just to verify my understanding) https://github.com/lshift/diffa/commit/c5e8971a5015bbd5882138c27076...
-

Ben Hood 2011-01-17 17:27:30 UTC
(from [7ee7e1936029c66cd7b387ea122ae5f1c32c3a1e]) Add a test for top-level sync with integer categories [#149]
defaultConstraints on ConfigStore now handles integer & date categories
https://github.com/lshift/diffa/commit/7ee7e1936029c66cd7b387ea122a... -

Ben Hood 2011-01-17 17:27:32 UTC
(from [6d04666ad49eac13347ebd76ec411122deba35ad]) Implementation & tests for IntegerCategoryFunction's descend method [#149] https://github.com/lshift/diffa/commit/6d04666ad49eac13347ebd76ec41...
-

Ben Hood 2011-01-17 17:27:32 UTC
(from [5920944adb73a9ddaa08e4bd1f4500853ecbdded]) Repeat mismatch test for integer categories [#149] https://github.com/lshift/diffa/commit/5920944adb73a9ddaa08e4bd1f45...
-

Ben Hood 2011-01-17 17:27:47 UTC
(from [5786e778edbb978b37dd57b0d9ede26772d73c02]) Factor out commonalities between the two mismatch tests [#149] https://github.com/lshift/diffa/commit/5786e778edbb978b37dd57b0d9ed...
-

Ben Hood 2011-01-17 17:27:48 UTC
(from [2767cadaa06304cd83315af1e30e07a20c538b5f]) Add integer category versions of test for out-of-date store [#149] https://github.com/lshift/diffa/commit/2767cadaa06304cd83315af1e30e...
-

Ben Hood 2011-01-17 17:27:52 UTC
(from [9c005d72f06e4b2fee35801061d98d5e3a783b68]) Integer category version of correlation store test [#149] https://github.com/lshift/diffa/commit/9c005d72f06e4b2fee35801061d9...
-

Ben Hood 2011-01-17 17:27:52 UTC
(from [bf329ce00ce4a2ad98f81843162d0a80aed0ac84]) Integer category version of match event test [#149] https://github.com/lshift/diffa/commit/bf329ce00ce4a2ad98f81843162d...
-

Ben Hood 2011-01-17 17:28:01 UTC
(from [339a0917648b06d3f1d4c786e1e13746e0938ed7]) Factor out commonalities in shouldOnlySyncTopLevels... tests [#149] https://github.com/lshift/diffa/commit/339a0917648b06d3f1d4c786e1e1...
-

Ben Hood 2011-01-17 17:28:04 UTC
(from [10046b69dd098cdd534de87cfe073cd1e146b18f]) Integer category version of another test [#149] https://github.com/lshift/diffa/commit/10046b69dd098cdd534de87cfe07...
-

Ben Hood 2011-01-17 17:28:06 UTC
(from [5493851637633ee6ab1b36bebcf16751611fc432]) Factor out more repetition of common test data [#149] https://github.com/lshift/diffa/commit/5493851637633ee6ab1b36bebcf1...
-

Ben Hood 2011-01-17 17:28:06 UTC
(from [c17fb31afb30d5dedd8378e895a403c7b10eb05b]) Factor our commonalities between tests for out-of-date store [#149] https://github.com/lshift/diffa/commit/c17fb31afb30d5dedd8378e895a4...
-

Ben Hood 2011-01-17 17:28:09 UTC
(from [df1a7473f1aba2b8fb0c9588721de56d0fedae13]) Integer category version of correlation changes test [#149] https://github.com/lshift/diffa/commit/df1a7473f1aba2b8fb0c9588721d...
-

Ben Hood 2011-01-17 17:28:10 UTC
(from [165216b94cb5d2884ca46fcd9859eee2feaa783c]) Use new Up and Down helper factories in CorrelatedVersionPolicyTest [#149] https://github.com/lshift/diffa/commit/165216b94cb5d2884ca46fcd9859...
-

Ben Hood 2011-01-17 17:28:10 UTC
(from [ad616876927ea56a3b6c4c1bee8c2683767dae28]) Integer category versions of tests in CorrelatedVersionPolicyTest [#149] https://github.com/lshift/diffa/commit/ad616876927ea56a3b6c4c1bee8c...
-

Ben Hood 2011-01-17 17:28:16 UTC
(from [47508ad1bfc63ffca6579b4774c891ef0da5f20f]) Parameterise IntegerCategoryFunction, allowing arbitrary partitions [#149] https://github.com/lshift/diffa/commit/47508ad1bfc63ffca6579b4774c8...
-

Ben Hood 2011-01-17 17:28:21 UTC
(from [178fde89efc01122425567581790c0dfbd3a5604]) Make AutoDescendingIntegerCategoryFunction a type instead of a factory function [#149] https://github.com/lshift/diffa/commit/178fde89efc01122425567581790...
-

Ben Hood 2011-01-17 17:28:21 UTC
(from [8056f1f717362a603dae1b47a20e92cb584bbbe4]) Test for exception thrown for invalid integer partition [#149] https://github.com/lshift/diffa/commit/8056f1f717362a603dae1b47a20e...
-

Ben Hood 2011-01-17 17:28:24 UTC
(from [663d371eb5d6dfb01ff5e3b81ef3c59f77feb888]) Blow up if args for AutoDescendingIntegerCategoryFunction are invalid [#149] https://github.com/lshift/diffa/commit/663d371eb5d6dfb01ff5e3b81ef3...
-

-

Ben Hood 2011-01-17 17:28:31 UTC
(from [83c196469fc2762c246451867c5d08b3a3dbea86]) Factor out common data from test method invocations [#149] https://github.com/lshift/diffa/commit/83c196469fc2762c246451867c5d...
-

Ben Hood 2011-01-17 17:28:31 UTC
(from [757c26b85e39c1d38e619baddb544850d3dea3f3]) Style, naming improvements etc [#149] https://github.com/lshift/diffa/commit/757c26b85e39c1d38e619baddb54...
-

Ben Hood 2011-01-17 17:28:34 UTC
(from [d2385eaaed1fbafdd539edc264623f671cc5ed16]) Implement integer category functions which narrow automatically [#149] https://github.com/lshift/diffa/commit/d2385eaaed1fbafdd539edc26462...
-

Ben Hood 2011-01-17 17:28:34 UTC
(from [448b3751a227b9e408b54a19f7b40e7c6328bac1]) Refactor parameterisation of policy tests [#149] https://github.com/lshift/diffa/commit/448b3751a227b9e408b54a19f7b4...
-

Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
A Real Time Differencing Tool.
People watching this ticket
Referenced by
-
2
Generalize entity partition criteria and granularity function
#149 - to add some non-date based tests fot
QueryConstraints
-
148
Multiple query constraints
The basics of this work have been completed. I haven't ad...
-
149
Write tests for non-date QueryConstraints
(from [cd3e1e3d168217bae8a6cf05a9b6cd9cf3b4960c])
Throw I...
-
149
Write tests for non-date QueryConstraints
(from [e4a4dc81384d830cb520cb8332837cc38cc70423])
Test & ...
-
149
Write tests for non-date QueryConstraints
(from [cde76d0071727471cec686a4da6c356cd5e11042])
Throw I...
-
149
Write tests for non-date QueryConstraints
(from [a1c9962e123a58edbcdee4ee86b553f285af70c3])
Name th...
-
149
Write tests for non-date QueryConstraints
(from [c5e8971a5015bbd5882138c27076710920a706ee])
Add a u...
-
149
Write tests for non-date QueryConstraints
(from [7ee7e1936029c66cd7b387ea122ae5f1c32c3a1e])
Add a t...
-
149
Write tests for non-date QueryConstraints
(from [6d04666ad49eac13347ebd76ec411122deba35ad])
Impleme...
-
149
Write tests for non-date QueryConstraints
(from [5920944adb73a9ddaa08e4bd1f4500853ecbdded])
Repeat ...
-
149
Write tests for non-date QueryConstraints
(from [5786e778edbb978b37dd57b0d9ede26772d73c02])
Factor ...
-
149
Write tests for non-date QueryConstraints
(from [2767cadaa06304cd83315af1e30e07a20c538b5f])
Add int...
-
149
Write tests for non-date QueryConstraints
(from [9c005d72f06e4b2fee35801061d98d5e3a783b68])
Integer...
-
149
Write tests for non-date QueryConstraints
(from [bf329ce00ce4a2ad98f81843162d0a80aed0ac84])
Integer...
-
149
Write tests for non-date QueryConstraints
(from [339a0917648b06d3f1d4c786e1e13746e0938ed7])
Factor ...
-
149
Write tests for non-date QueryConstraints
(from [10046b69dd098cdd534de87cfe073cd1e146b18f])
Integer...
-
149
Write tests for non-date QueryConstraints
(from [5493851637633ee6ab1b36bebcf16751611fc432])
Factor ...
-
149
Write tests for non-date QueryConstraints
(from [c17fb31afb30d5dedd8378e895a403c7b10eb05b])
Factor ...
-
149
Write tests for non-date QueryConstraints
(from [df1a7473f1aba2b8fb0c9588721de56d0fedae13])
Integer...
-
149
Write tests for non-date QueryConstraints
(from [165216b94cb5d2884ca46fcd9859eee2feaa783c])
Use new...
-
149
Write tests for non-date QueryConstraints
(from [ad616876927ea56a3b6c4c1bee8c2683767dae28])
Integer...
-
149
Write tests for non-date QueryConstraints
(from [47508ad1bfc63ffca6579b4774c891ef0da5f20f])
Paramet...
-
149
Write tests for non-date QueryConstraints
(from [178fde89efc01122425567581790c0dfbd3a5604])
Make Au...
-
149
Write tests for non-date QueryConstraints
(from [8056f1f717362a603dae1b47a20e92cb584bbbe4])
Test fo...
-
149
Write tests for non-date QueryConstraints
(from [663d371eb5d6dfb01ff5e3b81ef3c59f77feb888])
Blow up...
-
149
Write tests for non-date QueryConstraints
(from [661792dc739cbd32a8a66cc179faae79c6716fd7])
Merged ...
-
149
Write tests for non-date QueryConstraints
(from [83c196469fc2762c246451867c5d08b3a3dbea86])
Factor ...
-
149
Write tests for non-date QueryConstraints
(from [757c26b85e39c1d38e619baddb544850d3dea3f3])
Style, ...
-
149
Write tests for non-date QueryConstraints
(from [d2385eaaed1fbafdd539edc264623f671cc5ed16])
Impleme...
-
149
Write tests for non-date QueryConstraints
(from [448b3751a227b9e408b54a19f7b40e7c6328bac1])
Refacto...
-
148
Multiple query constraints
#149 has landed, so you should be good to
go...
-
161
String based category function
We need a category function that can partition string bas...