From 804c1bed90a6989fcc8fe54882f076a7c4e7ad77 Mon Sep 17 00:00:00 2001 From: MikaelGRA Date: Mon, 4 Dec 2017 16:56:35 +0100 Subject: [PATCH] added option for specifying timeout on InfluxClient. --- src/Vibrant.InfluxDB.Client/InfluxClient.cs | 15 +++++++++++++++ .../ReadWriteTests.cs | 2 ++ 2 files changed, 17 insertions(+) diff --git a/src/Vibrant.InfluxDB.Client/InfluxClient.cs b/src/Vibrant.InfluxDB.Client/InfluxClient.cs index 4074c29..03d7d2c 100644 --- a/src/Vibrant.InfluxDB.Client/InfluxClient.cs +++ b/src/Vibrant.InfluxDB.Client/InfluxClient.cs @@ -70,6 +70,21 @@ public InfluxClient( Uri endpoint ) } + /// + /// Gets or sets the timeout for all requests made. + /// + public TimeSpan Timeout + { + get + { + return _client.Timeout; + } + set + { + _client.Timeout = value; + } + } + /// /// Gets the default write options. /// diff --git a/test/Vibrant.InfluxDB.Client.Tests/ReadWriteTests.cs b/test/Vibrant.InfluxDB.Client.Tests/ReadWriteTests.cs index dd2d455..4f05b18 100644 --- a/test/Vibrant.InfluxDB.Client.Tests/ReadWriteTests.cs +++ b/test/Vibrant.InfluxDB.Client.Tests/ReadWriteTests.cs @@ -57,6 +57,7 @@ public async Task Should_Write_Typed_Rows_To_Database( int rows, int startYear, } [Theory] + [InlineData( 0, 2010 )] [InlineData( 500, 2011 )] [InlineData( 1000, 2012 )] [InlineData( 20000, 2013 )] @@ -67,6 +68,7 @@ public async Task Should_Write_Typed_Rows_With_Nulls_To_Database( int rows, int } [Theory] + [InlineData( 0, 2010 )] [InlineData( 500, 2011 )] [InlineData( 1000, 2012 )] [InlineData( 20000, 2013 )]