Closed kenota closed 11 years ago
Thank you for the unit tests. There was a simple bug which meant hasNextIndex() didn't really do anything useful. :| I have fixed it now and all these tests pass.
I think I'm seeing a similar problem. Is this code included in a specific version available on Maven?
If memory serves me correctly, it should be fixed in Chronicle 1.7.1 The latest is 1.7.2. I suggest you use this version.
On 29 July 2013 15:57, Jon Brisbin notifications@github.com wrote:
I think I'm seeing a similar problem. Is this code included in a specific version available on Maven?
— Reply to this email directly or view it on GitHubhttps://github.com/peter-lawrey/Java-Chronicle/issues/25#issuecomment-21721373 .
I was using 1.7.2.
It's odd because I'm seeing different behaviour on the Linux CI servers than I am on my Mac OS X local dev box. The hasNextIndex() is correctly reporting false on my local tests, but does not report false on the CI server build. This causes the tests to hang or fail completely.
Can you push me a unit test to demonstrate this?
On 29 July 2013 16:13, Jon Brisbin notifications@github.com wrote:
I was using 1.7.2.
It's odd because I'm seeing different behaviour on the Linux CI servers than I am on my Mac OS X local dev box. The hasNextIndex() is correctly reporting false on my local tests, but does not report false on the CI server build. This causes the tests to hang or fail completely.
— Reply to this email directly or view it on GitHubhttps://github.com/peter-lawrey/Java-Chronicle/issues/25#issuecomment-21722414 .
BTW I don't have access to a Mac OSX machine but I should be able to get it working for Linux.
On 29 July 2013 16:17, Peter Lawrey peter.lawrey@gmail.com wrote:
Can you push me a unit test to demonstrate this?
On 29 July 2013 16:13, Jon Brisbin notifications@github.com wrote:
I was using 1.7.2.
It's odd because I'm seeing different behaviour on the Linux CI servers than I am on my Mac OS X local dev box. The hasNextIndex() is correctly reporting false on my local tests, but does not report false on the CI server build. This causes the tests to hang or fail completely.
— Reply to this email directly or view it on GitHubhttps://github.com/peter-lawrey/Java-Chronicle/issues/25#issuecomment-21722414 .
I started playing with Chronicle library and trying to start from basic stuff, like walking through saved Chronicle. I encountered some problems with
Excerpt.hasNextIndex()
andExcerpt.nextIndex()
methods. I believe there are two cases, one is bug and another is either me not understanding what hasNextIndex() should do.IndexedChronicle
and create excerpt on it,hasNextIndex()
will return false, althoughnextIndex()
will return true. If you change order, both will return true (since index was moed to 0). See test methodstestHasNextIndexFail
andtestHasNextIndexPass
in attached unit testhasNext()
andnext()
methods, I would expectnextIndex()
method to return true wheneverhasNextIndex()
returns true. But it seems that this is not the case with Excerpt. SeetestHasNextIndexIteration()
method in unit test.Unit test to reproduce bug and show chronicle iteration: