ah, i saw this a few times and forgot about it. all of the subset-related
methods need extensive unit tests written; the vast majority of the "bugs" i
found in the merge-algorithm were actually bugs in those utility methods. in
JDK6 there is the Navigable[Set|Map] classes, which make those methods MUCH
easier to code, and reason about.

X

On 01/10/2010 04:29 PM, Ian Clarke wrote:
> Here we go, test failed apparently:
> 
> junit:
>    [delete] Deleting directory /private/tmp/plugin-Library-staging/run-test
>     [mkdir] Created dir: /private/tmp/plugin-Library-staging/run-test
>     [junit] ProtoIndex B-tree node_min set to 4
>     [junit] Running plugins.Library.index.BIndexTest
>     [junit] Testsuite: plugins.Library.index.BIndexTest
>     [junit] 0/4: 3002 entries generated in 582 ms, deflated in 1941
> ms, root at 6196f58c-95c7-441e-a00c-a5bf8eceec17.
>     [junit] ObjProc-val:{2|2|0} ObjProc-pull:{4|4|4} ObjProc-push:{0|0|0}
>     [junit] ObjProc-val:{12|2|0} ObjProc-pull:{23|26|20} ObjProc-push:{0|0|0}
>     [junit] ObjProc-val:{128|40|0} ObjProc-pull:{0|27|27} ObjProc-push:{0|0|0}
>     [junit] ObjProc-val:{128|40|0} ObjProc-pull:{0|27|27} ObjProc-push:{0|0|0}
>     [junit] ObjProc-val:{126|42|2} ObjProc-pull:{0|27|27} ObjProc-push:{0|0|0}
>     [junit] ObjProc-val:{114|52|14} ObjProc-pull:{0|27|27} 
> ObjProc-push:{0|0|0}
>     [junit] ObjProc-val:{101|67|27} ObjProc-pull:{0|27|27} 
> ObjProc-push:{0|0|0}
>     [junit] ObjProc-val:{81|68|47} ObjProc-pull:{0|27|27} ObjProc-push:{9|0|0}
>     [junit] ObjProc-val:{70|87|58} ObjProc-pull:{0|27|27} 
> ObjProc-push:{11|9|9}
>     [junit] ObjProc-val:{64|98|64} ObjProc-pull:{0|27|27} 
> ObjProc-push:{6|11|11}
>     [junit] ObjProc-val:{57|104|71} ObjProc-pull:{0|27|27}
> ObjProc-push:{7|15|15}
>     [junit] ObjProc-val:{44|111|84} ObjProc-pull:{0|27|27}
> ObjProc-push:{5|20|20}
>     [junit] ObjProc-val:{33|124|95} ObjProc-pull:{0|27|27}
> ObjProc-push:{6|22|22}
>     [junit] ObjProc-val:{20|128|108} ObjProc-pull:{0|27|27}
> ObjProc-push:{10|26|26}
>     [junit] ObjProc-val:{11|128|117} ObjProc-pull:{0|27|27}
> ObjProc-push:{7|32|32}
>     [junit] ObjProc-val:{5|128|123} ObjProc-pull:{0|27|27}
> ObjProc-push:{6|35|35}
>     [junit] ObjProc-val:{2|128|126} ObjProc-pull:{0|27|27}
> ObjProc-push:{5|38|38}
>     [junit] ObjProc-val:{0|128|128} ObjProc-pull:{0|27|27}
> ObjProc-push:{3|40|40}
>     [junit] ObjProc-val:{0|128|128} ObjProc-pull:{0|27|27}
> ObjProc-push:{1|41|41}
>     [junit] ObjProc-val:{0|128|128} ObjProc-pull:{0|27|27}
> ObjProc-push:{1|42|42}
>     [junit] ObjProc-val:{0|128|128} ObjProc-pull:{0|27|27}
> ObjProc-push:{0|42|42}
>     [junit] 3013 entries merged in 22566 ms, root at
> b65d755b-eb57-4de0-9266-f78616b144f2, re-inflated in 2194 ms.
>     [junit] validating merge. this will take a few minutes, mostly due
> to Thread.sleep(). just be patient :-)
>     [junit] merge validated in 215930 ms.
>     [junit]
>     [junit] 1/4: 2968 entries generated in 163 ms, deflated in 793 ms,
> root at b382378c-78af-4213-8135-127155d987a8.
>     [junit] ObjProc-val:{1|1|0} ObjProc-pull:{4|4|4} ObjProc-push:{0|0|0}
>     [junit] ObjProc-val:{9|9|0} ObjProc-pull:{23|27|20} ObjProc-push:{0|0|0}
>     [junit] ObjProc-val:{128|40|0} ObjProc-pull:{0|27|27} ObjProc-push:{0|0|0}
>     [junit] ObjProc-val:{128|40|0} ObjProc-pull:{0|27|27} ObjProc-push:{0|0|0}
>     [junit] ObjProc-val:{125|40|3} ObjProc-pull:{0|27|27} ObjProc-push:{0|0|0}
>     [junit] ObjProc-val:{104|43|24} ObjProc-pull:{0|27|27} 
> ObjProc-push:{2|0|0}
>     [junit] ObjProc-val:{100|64|28} ObjProc-pull:{0|27|27} 
> ObjProc-push:{4|2|2}
>     [junit] ObjProc-val:{89|68|39} ObjProc-pull:{0|27|27} ObjProc-push:{5|4|4}
>     [junit] ObjProc-val:{88|79|40} ObjProc-pull:{0|27|27} ObjProc-push:{3|7|7}
>     [junit] ObjProc-val:{75|82|53} ObjProc-pull:{0|27|27} ObjProc-push:{3|7|7}
>     [junit] ObjProc-val:{66|95|62} ObjProc-pull:{0|27|27} 
> ObjProc-push:{5|10|10}
>     [junit] ObjProc-val:{55|103|73} ObjProc-pull:{0|27|27}
> ObjProc-push:{5|13|13}
>     [junit] ObjProc-val:{50|113|78} ObjProc-pull:{0|27|27}
> ObjProc-push:{5|15|15}
>     [junit] ObjProc-val:{38|118|90} ObjProc-pull:{0|27|27}
> ObjProc-push:{6|18|18}
>     [junit] ObjProc-val:{28|128|100} ObjProc-pull:{0|27|27}
> ObjProc-push:{5|21|21}
>     [junit] ObjProc-val:{15|128|113} ObjProc-pull:{0|27|27}
> ObjProc-push:{8|25|25}
>     [junit] ObjProc-val:{9|128|119} ObjProc-pull:{0|27|27}
> ObjProc-push:{7|29|29}
>     [junit] ObjProc-val:{4|128|124} ObjProc-pull:{0|27|27}
> ObjProc-push:{6|33|33}
>     [junit] ObjProc-val:{3|128|125} ObjProc-pull:{0|27|27}
> ObjProc-push:{2|35|35}
>     [junit] ObjProc-val:{0|128|128} ObjProc-pull:{0|27|27}
> ObjProc-push:{2|35|35}
>     [junit] ObjProc-val:{0|128|128} ObjProc-pull:{0|27|27}
> ObjProc-push:{2|37|37}
>     [junit] ObjProc-val:{0|128|128} ObjProc-pull:{0|27|27}
> ObjProc-push:{2|39|39}
>     [junit] ObjProc-val:{0|128|128} ObjProc-pull:{0|27|27}
> ObjProc-push:{0|39|39}
>     [junit] 2970 entries merged in 23913 ms, root at
> 8a1b2230-c6bc-4a0c-a223-a2ebe1353e5f, re-inflated in 2109 ms.
>     [junit] validating merge. this will take a few minutes, mostly due
> to Thread.sleep(). just be patient :-)
>     [junit] merge validated in 219027 ms.
>     [junit]
>     [junit] 2/4: 2959 entries generated in 136 ms, deflated in 688 ms,
> root at e7b04aae-8ac2-44f6-abc0-bad891f7fa18.
>     [junit] ObjProc-val:{3|3|0} ObjProc-pull:{4|4|4} ObjProc-push:{0|0|0}
>     [junit] 0/4: 7753 entries generated in 348 ms, deflated in 1436
> ms, root at af57e855-abcb-4aba-89e7-47bc890bcca3, inflated all terms
> separately in 51 ms
>     [junit] 1/4: 8758 entries generated in 289 ms, deflated in 1841
> ms, root at 12da5280-9e3f-4f71-8001-df322896fcfe, inflated all terms
> separately in 44 ms
>     [junit] Tests run: 3, Failures: 1, Errors: 0, Time elapsed: 495.224 sec
>     [junit] Tests run: 3, Failures: 1, Errors: 0, Time elapsed: 495.224 sec
>     [junit] ------------- Standard Output ---------------
>     [junit] ProtoIndex B-tree node_min set to 4
>     [junit] 0/4: 3002 entries generated in 582 ms, deflated in 1941
> ms, root at 6196f58c-95c7-441e-a00c-a5bf8eceec17.
>     [junit] ObjProc-val:{2|2|0} ObjProc-pull:{4|4|4} ObjProc-push:{0|0|0}
>     [junit] ObjProc-val:{12|2|0} ObjProc-pull:{23|26|20} ObjProc-push:{0|0|0}
>     [junit] ObjProc-val:{128|40|0} ObjProc-pull:{0|27|27} ObjProc-push:{0|0|0}
>     [junit] ObjProc-val:{128|40|0} ObjProc-pull:{0|27|27} ObjProc-push:{0|0|0}
>     [junit] ObjProc-val:{126|42|2} ObjProc-pull:{0|27|27} ObjProc-push:{0|0|0}
>     [junit] ObjProc-val:{114|52|14} ObjProc-pull:{0|27|27} 
> ObjProc-push:{0|0|0}
>     [junit] ObjProc-val:{101|67|27} ObjProc-pull:{0|27|27} 
> ObjProc-push:{0|0|0}
>     [junit] ObjProc-val:{81|68|47} ObjProc-pull:{0|27|27} ObjProc-push:{9|0|0}
>     [junit] ObjProc-val:{70|87|58} ObjProc-pull:{0|27|27} 
> ObjProc-push:{11|9|9}
>     [junit] ObjProc-val:{64|98|64} ObjProc-pull:{0|27|27} 
> ObjProc-push:{6|11|11}
>     [junit] ObjProc-val:{57|104|71} ObjProc-pull:{0|27|27}
> ObjProc-push:{7|15|15}
>     [junit] ObjProc-val:{44|111|84} ObjProc-pull:{0|27|27}
> ObjProc-push:{5|20|20}
>     [junit] ObjProc-val:{33|124|95} ObjProc-pull:{0|27|27}
> ObjProc-push:{6|22|22}
>     [junit] ObjProc-val:{20|128|108} ObjProc-pull:{0|27|27}
> ObjProc-push:{10|26|26}
>     [junit] ObjProc-val:{11|128|117} ObjProc-pull:{0|27|27}
> ObjProc-push:{7|32|32}
>     [junit] ObjProc-val:{5|128|123} ObjProc-pull:{0|27|27}
> ObjProc-push:{6|35|35}
>     [junit] ObjProc-val:{2|128|126} ObjProc-pull:{0|27|27}
> ObjProc-push:{5|38|38}
>     [junit] ObjProc-val:{0|128|128} ObjProc-pull:{0|27|27}
> ObjProc-push:{3|40|40}
>     [junit] ObjProc-val:{0|128|128} ObjProc-pull:{0|27|27}
> ObjProc-push:{1|41|41}
>     [junit] ObjProc-val:{0|128|128} ObjProc-pull:{0|27|27}
> ObjProc-push:{1|42|42}
>     [junit] ObjProc-val:{0|128|128} ObjProc-pull:{0|27|27}
> ObjProc-push:{0|42|42}
>     [junit] 3013 entries merged in 22566 ms, root at
> b65d755b-eb57-4de0-9266-f78616b144f2, re-inflated in 2194 ms.
>     [junit] validating merge. this will take a few minutes, mostly due
> to Thread.sleep(). just be patient :-)
>     [junit] merge validated in 215930 ms.
>     [junit]
>     [junit] 1/4: 2968 entries generated in 163 ms, deflated in 793 ms,
> root at b382378c-78af-4213-8135-127155d987a8.
>     [junit] ObjProc-val:{1|1|0} ObjProc-pull:{4|4|4} ObjProc-push:{0|0|0}
>     [junit] ObjProc-val:{9|9|0} ObjProc-pull:{23|27|20} ObjProc-push:{0|0|0}
>     [junit] ObjProc-val:{128|40|0} ObjProc-pull:{0|27|27} ObjProc-push:{0|0|0}
>     [junit] ObjProc-val:{128|40|0} ObjProc-pull:{0|27|27} ObjProc-push:{0|0|0}
>     [junit] ObjProc-val:{125|40|3} ObjProc-pull:{0|27|27} ObjProc-push:{0|0|0}
>     [junit] ObjProc-val:{104|43|24} ObjProc-pull:{0|27|27} 
> ObjProc-push:{2|0|0}
>     [junit] ObjProc-val:{100|64|28} ObjProc-pull:{0|27|27} 
> ObjProc-push:{4|2|2}
>     [junit] ObjProc-val:{89|68|39} ObjProc-pull:{0|27|27} ObjProc-push:{5|4|4}
>     [junit] ObjProc-val:{88|79|40} ObjProc-pull:{0|27|27} ObjProc-push:{3|7|7}
>     [junit] ObjProc-val:{75|82|53} ObjProc-pull:{0|27|27} ObjProc-push:{3|7|7}
>     [junit] ObjProc-val:{66|95|62} ObjProc-pull:{0|27|27} 
> ObjProc-push:{5|10|10}
>     [junit] ObjProc-val:{55|103|73} ObjProc-pull:{0|27|27}
> ObjProc-push:{5|13|13}
>     [junit] ObjProc-val:{50|113|78} ObjProc-pull:{0|27|27}
> ObjProc-push:{5|15|15}
>     [junit] ObjProc-val:{38|118|90} ObjProc-pull:{0|27|27}
> ObjProc-push:{6|18|18}
>     [junit] ObjProc-val:{28|128|100} ObjProc-pull:{0|27|27}
> ObjProc-push:{5|21|21}
>     [junit] ObjProc-val:{15|128|113} ObjProc-pull:{0|27|27}
> ObjProc-push:{8|25|25}
>     [junit] ObjProc-val:{9|128|119} ObjProc-pull:{0|27|27}
> ObjProc-push:{7|29|29}
>     [junit] ObjProc-val:{4|128|124} ObjProc-pull:{0|27|27}
> ObjProc-push:{6|33|33}
>     [junit] ObjProc-val:{3|128|125} ObjProc-pull:{0|27|27}
> ObjProc-push:{2|35|35}
>     [junit] ObjProc-val:{0|128|128} ObjProc-pull:{0|27|27}
> ObjProc-push:{2|35|35}
>     [junit] ObjProc-val:{0|128|128} ObjProc-pull:{0|27|27}
> ObjProc-push:{2|37|37}
>     [junit] ObjProc-val:{0|128|128} ObjProc-pull:{0|27|27}
> ObjProc-push:{2|39|39}
>     [junit] ObjProc-val:{0|128|128} ObjProc-pull:{0|27|27}
> ObjProc-push:{0|39|39}
>     [junit] 2970 entries merged in 23913 ms, root at
> 8a1b2230-c6bc-4a0c-a223-a2ebe1353e5f, re-inflated in 2109 ms.
>     [junit] validating merge. this will take a few minutes, mostly due
> to Thread.sleep(). just be patient :-)
>     [junit] merge validated in 219027 ms.
>     [junit]
>     [junit] 2/4: 2959 entries generated in 136 ms, deflated in 688 ms,
> root at e7b04aae-8ac2-44f6-abc0-bad891f7fa18.
>     [junit] ObjProc-val:{3|3|0} ObjProc-pull:{4|4|4} ObjProc-push:{0|0|0}
>     [junit] 0/4: 7753 entries generated in 348 ms, deflated in 1436
> ms, root at af57e855-abcb-4aba-89e7-47bc890bcca3, inflated all terms
> separately in 51 ms
>     [junit] 1/4: 8758 entries generated in 289 ms, deflated in 1841
> ms, root at 12da5280-9e3f-4f71-8001-df322896fcfe, inflated all terms
> separately in 44 ms
>     [junit] ------------- ---------------- ---------------
>     [junit]
>     [junit] Testcase: testBasicMulti took 491.197 sec
>     [junit]     FAILED
>     [junit] null
>     [junit] junit.framework.AssertionFailedError
>     [junit]     at plugins.Library.util.Sorted.split(Sorted.java:188)
>     [junit]     at
> plugins.Library.util.SkeletonBTreeMap$1InflateChildNodes.invoke(SkeletonBTreeMap.java:1012)
>     [junit]     at
> plugins.Library.util.SkeletonBTreeMap$1InflateChildNodes.invoke(SkeletonBTreeMap.java:953)
>     [junit]     at
> plugins.Library.util.SkeletonBTreeMap.update(SkeletonBTreeMap.java:1085)
>     [junit]     at
> plugins.Library.util.SkeletonBTreeMap.update(SkeletonBTreeMap.java:679)
>     [junit]     at
> plugins.Library.index.BIndexTest.fullInflateDeflateUpdate(BIndexTest.java:199)
>     [junit]     at
> plugins.Library.index.BIndexTest.testBasicMulti(BIndexTest.java:239)
>     [junit]
>     [junit] Testcase: testPartialInflateMulti took 4.01 sec
>     [junit] Testcase: testProgress took 0 sec
> 
> BUILD FAILED
> /private/tmp/plugin-Library-staging/build.xml:187: Test
> plugins.Library.index.BIndexTest failed
> 

Reply via email to