@@ -705,6 +705,35 @@ public void ResponseWithError()
705705 }
706706 }
707707
708+ [ Test ]
709+ public void ParseInfinite ( )
710+ {
711+ const string data = @"#group,false,false,true,true,true,true,true,true,true,true,false,false
712+ #datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,string,string,string,string,string,string,double,double
713+ #default,_result,,,,,,,,,,,
714+ ,result,table,_start,_stop,_field,_measurement,language,license,name,owner,le,_value
715+ ,,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
716+ ,,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
717+ ,,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
718+ ,,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
719+ ,,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
720+ ,,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
721+ ,,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
722+ ,,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
723+ ,,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
724+ ,,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
725+ ,,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
726+ ,,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
727+
728+ " ;
729+
730+ var tables = ParseFluxResponse ( data ) ;
731+ Assert . AreEqual ( 1 , tables . Count ) ;
732+ Assert . AreEqual ( 12 , tables [ 0 ] . Records . Count ) ;
733+ Assert . AreEqual ( double . PositiveInfinity , tables [ 0 ] . Records [ 10 ] . GetValueByKey ( "le" ) ) ;
734+ Assert . AreEqual ( double . NegativeInfinity , tables [ 0 ] . Records [ 11 ] . GetValueByKey ( "le" ) ) ;
735+ }
736+
708737 private List < FluxTable > ParseFluxResponse ( string data )
709738 {
710739 var consumer = new FluxCsvParser . FluxResponseConsumerTable ( ) ;
0 commit comments