@@ -613,6 +613,33 @@ public void parseExportFromUserInterface() throws IOException {
613
613
Assertions .assertThat (tables .get (1 ).getRecords ()).hasSize (1 );
614
614
}
615
615
616
+ @ Test
617
+ public void parseInf () throws IOException {
618
+ String data = "#group,false,false,true,true,true,true,true,true,true,true,false,false\n "
619
+ + "#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,double,double\n "
620
+ + "#default,_result,,,,,,,,,,,\n "
621
+ + ",result,table,_start,_stop,_field,_measurement,language,license,name,owner,le,_value\n "
622
+ + ",,0,2021-06-23T06:50:11.897825012Z,2021-06-25T06:50:11.897825012Z,stars,github_repository,C#,MIT License,influxdb-client-csharp,influxdata,0,0\n "
623
+ + ",,0,2021-06-23T06:50:11.897825012Z,2021-06-25T06:50:11.897825012Z,stars,github_repository,C#,MIT License,influxdb-client-csharp,influxdata,10,0\n "
624
+ + ",,0,2021-06-23T06:50:11.897825012Z,2021-06-25T06:50:11.897825012Z,stars,github_repository,C#,MIT License,influxdb-client-csharp,influxdata,20,0\n "
625
+ + ",,0,2021-06-23T06:50:11.897825012Z,2021-06-25T06:50:11.897825012Z,stars,github_repository,C#,MIT License,influxdb-client-csharp,influxdata,30,0\n "
626
+ + ",,0,2021-06-23T06:50:11.897825012Z,2021-06-25T06:50:11.897825012Z,stars,github_repository,C#,MIT License,influxdb-client-csharp,influxdata,40,0\n "
627
+ + ",,0,2021-06-23T06:50:11.897825012Z,2021-06-25T06:50:11.897825012Z,stars,github_repository,C#,MIT License,influxdb-client-csharp,influxdata,50,0\n "
628
+ + ",,0,2021-06-23T06:50:11.897825012Z,2021-06-25T06:50:11.897825012Z,stars,github_repository,C#,MIT License,influxdb-client-csharp,influxdata,60,0\n "
629
+ + ",,0,2021-06-23T06:50:11.897825012Z,2021-06-25T06:50:11.897825012Z,stars,github_repository,C#,MIT License,influxdb-client-csharp,influxdata,70,0\n "
630
+ + ",,0,2021-06-23T06:50:11.897825012Z,2021-06-25T06:50:11.897825012Z,stars,github_repository,C#,MIT License,influxdb-client-csharp,influxdata,80,0\n "
631
+ + ",,0,2021-06-23T06:50:11.897825012Z,2021-06-25T06:50:11.897825012Z,stars,github_repository,C#,MIT License,influxdb-client-csharp,influxdata,90,0\n "
632
+ + ",,0,2021-06-23T06:50:11.897825012Z,2021-06-25T06:50:11.897825012Z,stars,github_repository,C#,MIT License,influxdb-client-csharp,influxdata,+Inf,15\n "
633
+ + ",,0,2021-06-23T06:50:11.897825012Z,2021-06-25T06:50:11.897825012Z,stars,github_repository,C#,MIT License,influxdb-client-csharp,influxdata,-Inf,15\n "
634
+ + "\n " ;
635
+
636
+ List <FluxTable > tables = parseFluxResponse (data );
637
+ Assertions .assertThat (tables ).hasSize (1 );
638
+ Assertions .assertThat (tables .get (0 ).getRecords ()).hasSize (12 );
639
+ Assertions .assertThat (tables .get (0 ).getRecords ().get (10 ).getValueByKey ("le" )).isEqualTo (Double .POSITIVE_INFINITY );
640
+ Assertions .assertThat (tables .get (0 ).getRecords ().get (11 ).getValueByKey ("le" )).isEqualTo (Double .NEGATIVE_INFINITY );
641
+ }
642
+
616
643
@ Nonnull
617
644
private List <FluxTable > parseFluxResponse (@ Nonnull final String data ) throws IOException {
618
645
0 commit comments