Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Flagsmith.Client.Test/FlagsmithTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -802,5 +802,15 @@ public async Task TestGetIdentityFlagsTransientIdentityWithoutTraitCallsExpected
Assert.True(await identityFlags.IsFeatureEnabled("some_feature"));
Assert.Equal("some-identity-trait-value", await identityFlags.GetFeatureValue("some_feature"));
}

[Fact]
public void TestRequestTimeoutInterpretsSecondsCorrectly()
{
var config = new FlagsmithConfiguration
{
RequestTimeout = 100
};
Assert.Equal(100, config.RequestTimeout);
}
}
}
2 changes: 1 addition & 1 deletion Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
/// <summary>
/// Callable which will be used in the case where flags cannot be retrieved from the API or a non existent feature is requested.
/// </summary>
public Func<string, Flag>? DefaultFlagHandler { get; set; }

Check warning on line 69 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.FlagsmithClient)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 69 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 6.0.x)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 69 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.Engine)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 69 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.EngineTest)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 69 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 7.0.x)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 69 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.Client.Test)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 69 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 8.0.x)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
/// <summary>
/// Provide logger for logging polling info & errors which is only applicable when client side evalution is enabled and analytics errors.
/// </summary>
Expand All @@ -81,7 +81,7 @@
/// </summary>
public Double? RequestTimeout
{
get => _timeout.Seconds;
get => _timeout.TotalSeconds;
set => _timeout = TimeSpan.FromSeconds(value ?? 100);
}

Expand All @@ -107,7 +107,7 @@
/// <summary>
/// Handler for offline mode operations.
/// </summary>
public BaseOfflineHandler? OfflineHandler { get; set; }

Check warning on line 110 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.FlagsmithClient)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 110 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 6.0.x)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 110 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.Engine)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 110 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.EngineTest)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 110 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 7.0.x)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 110 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.Client.Test)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 110 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 8.0.x)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

/// <summary>
/// Http client used for flagsmith-API requests.
Expand Down
Loading