Skip to content

Commit

Permalink
Merge pull request tronprotocol#3920 from halibobo1205/db/close_iterator
Browse files Browse the repository at this point in the history
Db/close jni iterator add code cover test
  • Loading branch information
lvs007 authored Jul 15, 2021
2 parents 3c3fd83 + 3d4a17a commit 6358aa6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions framework/src/test/java/org/tron/core/db/KhaosDatabaseTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,14 @@ public void testGetBranch() {
System.out.println(e.getMessage());
}
}

@Test(expected = UnsupportedOperationException.class)
public void testIsNotEmpty() {
BlockCapsule blockCapsule = new BlockCapsule(Block.newBuilder().setBlockHeader(
BlockHeader.newBuilder().setRawData(raw.newBuilder().setParentHash(ByteString.copyFrom(
ByteArray.fromHexString(
"0304f784e4e7bae517bcab94c3e0c9214fb4ac7ff9d7d5a937d1f40031f87b81"))))).build());
khaosDatabase.start(blockCapsule);
khaosDatabase.isNotEmpty();
}
}

0 comments on commit 6358aa6

Please sign in to comment.