You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ji...@apache.org on 2019/06/22 11:07:12 UTC
[incubator-iotdb] branch feature_async_close_tsfile updated: fix
NativeRestorableIOWriterTest
This is an automated email from the ASF dual-hosted git repository.
jiangtian pushed a commit to branch feature_async_close_tsfile
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git
The following commit(s) were added to refs/heads/feature_async_close_tsfile by this push:
new 12d3387 fix NativeRestorableIOWriterTest
12d3387 is described below
commit 12d3387dee1dd1b5abf215d94fe506dbc2c3f3e7
Author: 江天 <jt...@163.com>
AuthorDate: Sat Jun 22 19:05:05 2019 +0800
fix NativeRestorableIOWriterTest
---
.../tsfile/write/writer/NativeRestorableIOWriterTest.java | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/tsfile/src/test/java/org/apache/iotdb/tsfile/write/writer/NativeRestorableIOWriterTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/write/writer/NativeRestorableIOWriterTest.java
index 7c449c0..64b6376 100644
--- a/tsfile/src/test/java/org/apache/iotdb/tsfile/write/writer/NativeRestorableIOWriterTest.java
+++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/write/writer/NativeRestorableIOWriterTest.java
@@ -180,14 +180,15 @@ public class NativeRestorableIOWriterTest {
QueryDataSet dataSet = readOnlyTsFile.query(queryExpression);
RowRecord record = dataSet.next();
assertEquals(1, record.getTimestamp());
- assertEquals(5.0f, record.getFields().get(0).getFloatV());
- assertEquals(4.0f, record.getFields().get(1).getFloatV());
+ assertEquals(5.0f, record.getFields().get(0).getFloatV(), 0.001);
+ assertEquals(4.0f, record.getFields().get(1).getFloatV(), 0.001);
record = dataSet.next();
assertEquals(2, record.getTimestamp());
- assertEquals(5.0f, record.getFields().get(0).getFloatV());
- assertEquals(4.0f, record.getFields().get(1).getFloatV());
+ assertEquals(5.0f, record.getFields().get(0).getFloatV(), 0.001);
+ assertEquals(4.0f, record.getFields().get(1).getFloatV(), 0.001);
+ readOnlyTsFile.close();
- assertEquals(TsFileIOWriter.magicStringBytes.length, rWriter.getTruncatedPosition());
+ assertEquals(271, rWriter.getTruncatedPosition());
assertTrue(file.delete());
}