Skip to content

Commit 0aa7137

Browse files
[FSSDK-9090] Default instantiation of OdpManager for Optimizely constructors (#347)
* Add default OdpManager for Optimizely constructor * Fix linter error * Fix linter error seriously this time * Linting OptimizelyTest too * Fix brittle, commonly-failing tests * Grrr lint fix * Fix lints Need to auto-run lint fixes on commit * Lint fixes need to be refined * Fix linting settings & use during CI * Fix EDITORCONFIG_FILE_NAME * Correct path to .edtiorconfig? * Use GITHUB_WORKSPACE to .editorconfig * dotnet-format automatically looks for .editorconfig in repo root
1 parent bc80d72 commit 0aa7137

File tree

6 files changed

+329
-326
lines changed

6 files changed

+329
-326
lines changed

.editorconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,9 @@ csharp_preferred_modifier_order = public, private, protected, internal, static,
9595
csharp_prefer_braces = true:silent
9696
csharp_style_deconstructed_variable_declaration = true:suggestion
9797
csharp_prefer_simple_default_expression = true:suggestion
98-
csharp_style_prefer_local_over_anonymous_function = true:suggestion
9998
csharp_style_inlined_variable_declaration = true:suggestion
99+
# 'using' directive placement
100+
csharp_using_directive_placement = outside_namespace
100101
###############################
101102
# C# Formatting Rules #
102103
###############################

.github/workflows/csharp.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
VALIDATE_ALL_CODEBASE: false
2929
DEFAULT_BRANCH: master
3030
VALIDATE_CSHARP: true
31-
31+
3232
integration_tests:
3333
name: Run Integration Tests
3434
uses: optimizely/csharp-sdk/.github/workflows/integration_test.yml@master

OptimizelySDK.Tests/ConfigTest/PollingProjectConfigManagerTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ public void TestPollingConfigManagerBlocksWhenProjectConfigIsNotProvided()
6868
{
6969
POLL_EVERY_MILLISECONDS,
7070
});
71+
configManager.Start();
7172

7273
stopwatch.Start();
7374
configManager.GetConfig();

OptimizelySDK.Tests/NotificationTests/NotificationCenterTests.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017, 2019, Optimizely
2+
* Copyright 2017, 2019, 2023, Optimizely
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,6 +16,7 @@
1616

1717
using System;
1818
using System.Collections.Generic;
19+
using System.Threading;
1920
using Moq;
2021
using NUnit.Framework;
2122
using OptimizelySDK.Config;
@@ -332,8 +333,10 @@ Dictionary<string, object> decisionInfo
332333

333334
public virtual void TestConfigUpdateCallback() { }
334335

336+
public virtual void TestConfigUpdateCallback(CountdownEvent cde) { cde.Signal(); }
337+
335338
public virtual void TestLogEventCallback(LogEvent logEvent) { }
336339
}
337340

338-
#endregion // Test Notification callbacks class.
341+
#endregion
339342
}

0 commit comments

Comments
 (0)