[RocksJava] WriteBatchWithIndexTest fix

Previous to this commit identiy checks were performed. Now tests are
performed using equals - method as intended.
main
fyrz 10 years ago
parent c787fb50b8
commit c75c02e7a2
  1. 6
      java/org/rocksdb/test/WriteBatchWithIndexTest.java

@ -217,19 +217,19 @@ public class WriteBatchWithIndexTest {
it.seek(key); it.seek(key);
assertThat(it.isValid()).isTrue(); assertThat(it.isValid()).isTrue();
assertThat(it.entry()).isEqualTo(expected[testOffset]); assertThat(it.entry().equals(expected[testOffset])).isTrue();
} }
//forward iterative access //forward iterative access
int i = 0; int i = 0;
for(it.seekToFirst(); it.isValid(); it.next()) { for(it.seekToFirst(); it.isValid(); it.next()) {
assertThat(it.entry()).isEqualTo(expected[i++]); assertThat(it.entry().equals(expected[i++])).isTrue();
} }
//reverse iterative access //reverse iterative access
i = expected.length - 1; i = expected.length - 1;
for(it.seekToLast(); it.isValid(); it.prev()) { for(it.seekToLast(); it.isValid(); it.prev()) {
assertThat(it.entry()).isEqualTo(expected[i--]); assertThat(it.entry().equals(expected[i--])).isTrue();
} }
} finally { } finally {

Loading…
Cancel
Save