True, I misunderstood Robert and_TestUtil#randomRealisticUnicodeString(random). I will change the test. Thanks for pointing this out to me.
On 16 July 2013 23:12, Chris Hostetter <hossman_luc...@fucit.org> wrote: > > : This should fix this, b/c value2 (one extra character) will always be > : different than value1. The test initially failed b/c value1 and value2 > were > : equal. > > rmuir's point is that what you are describing is not garunteed to be true, > because randomRealisticUnicodeString returns strings of random lengths as > well (unless you specifiy minLength and maxLength) > > The first call to randomRealisticUnicodeString(random()) might set value1 > to "foox" and the second call to randomRealisticUnicodeString(random()) > might return "foo" making the value of value1 "foox" as well. > > I think you just want something like: String value2 = value1 + "x" > > > > : On 16 July 2013 21:37, Robert Muir <rcm...@gmail.com> wrote: > : > : > Does this really fix this or just make it less likely to happen...? > : > > : > > : > On Tue, Jul 16, 2013 at 12:15 PM, <m...@apache.org> wrote: > : > > : >> > : >> String value1 = > _TestUtil.randomRealisticUnicodeString(random()); > : >> - String value2 = > _TestUtil.randomRealisticUnicodeString(random()); > : >> + String value2 = > _TestUtil.randomRealisticUnicodeString(random()) + > : >> "x"; // this must be not equal to value1 > : >> > : > > : > : > : -- > : Met vriendelijke groet, > : > : Martijn van Groningen > : > > -Hoss > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org > For additional commands, e-mail: dev-h...@lucene.apache.org > > -- Met vriendelijke groet, Martijn van Groningen