Skip to content

Commit

Permalink
added option for specifying timeout on InfluxClient.
Browse files Browse the repository at this point in the history
  • Loading branch information
MikaelGRA committed Dec 4, 2017
1 parent cb664f6 commit 804c1be
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/Vibrant.InfluxDB.Client/InfluxClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,21 @@ public InfluxClient( Uri endpoint )

}

/// <summary>
/// Gets or sets the timeout for all requests made.
/// </summary>
public TimeSpan Timeout
{
get
{
return _client.Timeout;
}
set
{
_client.Timeout = value;
}
}

/// <summary>
/// Gets the default write options.
/// </summary>
Expand Down
2 changes: 2 additions & 0 deletions test/Vibrant.InfluxDB.Client.Tests/ReadWriteTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 )]
Expand All @@ -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 )]
Expand Down

0 comments on commit 804c1be

Please sign in to comment.