Skip to content

Commit

Permalink
Bump version (#363)
Browse files Browse the repository at this point in the history
* Bump version

* Make token less flaky, maybe.

---------

Co-authored-by: cognite-bulldozer[bot] <51074376+cognite-bulldozer[bot]@users.noreply.github.com>
  • Loading branch information
einarmo and cognite-bulldozer[bot] authored Jan 16, 2024
1 parent 5d45cd6 commit 19903a9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
19 changes: 11 additions & 8 deletions ExtractorUtils.Test/unit/CogniteTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ public async Task TestAuthenticator()
services.AddSingleton<AuthenticatorConfig>(config.Cognite.IdpAuthentication);
services.AddTestLogging(_output);
services.AddHttpClient<IAuthenticator, Authenticator>();
using (var provider = services.BuildServiceProvider()) {
using (var provider = services.BuildServiceProvider())
{
var auth = provider.GetRequiredService<IAuthenticator>();
var token = await auth.GetToken();
Assert.Equal("token0", token);
await Task.Delay(100);
token = await auth.GetToken(); // same token
Assert.Equal("token0", token);
await Task.Delay(2000); // token expired
Expand All @@ -84,7 +84,7 @@ public async Task TestAuthenticator()
// Verify that the authentication endpoint was called 3 times
mockHttpMessageHandler.Protected()
.Verify<Task<HttpResponseMessage>>(
"SendAsync",
"SendAsync",
Times.Exactly(3),
ItExpr.IsAny<HttpRequestMessage>(),
ItExpr.IsAny<CancellationToken>());
Expand Down Expand Up @@ -185,11 +185,13 @@ public async Task TestEnsureTimeSeries(params string[] ids)
services.AddConfig<BaseConfig>(path, 2);
services.AddTestLogging(_output);
services.AddCogniteClient("testApp");
using (var provider = services.BuildServiceProvider()) {
using (var provider = services.BuildServiceProvider())
{
var cogniteDestination = provider.GetRequiredService<CogniteDestination>();

Func<IEnumerable<string>, IEnumerable<TimeSeriesCreate>> createFunction =
(ids) => {

Func<IEnumerable<string>, IEnumerable<TimeSeriesCreate>> createFunction =
(ids) =>
{
var toCreate = new List<TimeSeriesCreate>();
foreach (var id in ids)
{
Expand Down Expand Up @@ -276,7 +278,8 @@ public async Task TestEnsureAssets(params string[] ids)
var cogniteDestination = provider.GetRequiredService<CogniteDestination>();

Func<IEnumerable<string>, IEnumerable<AssetCreate>> createFunction =
(ids) => {
(ids) =>
{
var toCreate = new List<AssetCreate>();
foreach (var id in ids)
{
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.17.3
1.18.0

0 comments on commit 19903a9

Please sign in to comment.