File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
main/java/org/influxdb/dto Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -222,6 +222,10 @@ void setPoints(final List<Point> points) {
222222 */
223223 public BatchPoints point (final Point point ) {
224224 point .getTags ().putAll (this .tags );
225+ if (null != this .time ) {
226+ point .setTime (this .time );
227+ }
228+ point .setPrecision (this .precision );
225229 this .points .add (point );
226230 return this ;
227231 }
Original file line number Diff line number Diff line change @@ -167,5 +167,11 @@ public void testTicket44() {
167167 point = Point .measurement ("test" ).time (1 , TimeUnit .MILLISECONDS ).field ("a" , 1 ).build ();
168168 batchPoints = BatchPoints .database ("db" ).point (point ).build ();
169169 assertThat (batchPoints .lineProtocol ()).asString ().isEqualTo ("test a=1 1000000\n " );
170+
171+ point = Point .measurement ("test" ).field ("a" , 1 ).build ();
172+ batchPoints = BatchPoints .database ("db" ).time (1 , TimeUnit .MILLISECONDS ).build ();
173+ batchPoints = batchPoints .point (point );
174+ assertThat (batchPoints .lineProtocol ()).asString ().isEqualTo ("test a=1 1000000\n " );
175+
170176 }
171177}
You can’t perform that action at this time.
0 commit comments