Skip to content

Commit 11652f7

Browse files
authored
chore: Address stale TODO items. (#219)
Addressed some TODO items which are stale, or which for the implementation has already been handled. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Cleanup and test tightening** > > - Removes stale TODO comments in `FDv2DataSystem.cs` and `FDv2StreamingDataSource.cs` > - Enables `dataSource.Initialized` assertions in multiple `FDv2DataSource` tests to verify initialization state > - No functional code changes to production paths > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 91e9198. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent afb112b commit 11652f7

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed

pkgs/sdk/server/src/Internal/DataSystem/FDv2DataSystem.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,7 @@ public static FDv2DataSystem Create(Logger logger, Configuration configuration,
7272

7373
var writeThroughStore = new WriteThroughStore(memoryStore, persistentStore,
7474
dataSystemConfiguration.PersistentDataStoreMode);
75-
76-
// TODO: When a persistent store is available we monitor it, is this a consistent choice.
77-
// TODO: Update the responses data store monitoring?
75+
7876
var dataStoreStatusProvider = new DataStoreStatusProviderImpl(writeThroughStore, dataStoreUpdates);
7977
var dataSourceUpdates = new DataSourceUpdatesImpl(writeThroughStore, dataStoreStatusProvider,
8078
clientContext.TaskExecutor, logger, logConfig.LogDataSourceOutageAsErrorAfter);

pkgs/sdk/server/src/Internal/FDv2DataSources/FDv2StreamingDataSource.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,6 @@ private void OnMessage(object sender, MessageReceivedEventArgs e)
224224
if (!storeError)
225225
{
226226
_lastStoreUpdateFailed.GetAndSet(false);
227-
228-
// TODO: This may be more nuanced or not required once we have the composite
229-
// data source.
230227
MaybeMarkInitialized();
231228
}
232229
else

pkgs/sdk/server/test/Internal/FDv2DataSources/FDv2DataSourceTest.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,7 @@ public async Task FirstInitializerFailsSecondInitializerSucceedsWithSelectorSwit
164164
Assert.Equal(DataSourceState.Valid, statusUpdates[4].State);
165165

166166
// Verify that the data source is initialized
167-
// TODO: uncomment this check once Initialized is implemented
168-
// Assert.True(dataSource.Initialized);
167+
Assert.True(dataSource.Initialized);
169168

170169
// Verify that Apply was called twice: once for second initializer, once for synchronizer
171170
// Verify the first Apply call was with second initializer dummy data
@@ -333,8 +332,7 @@ public async Task FirstInitializerFailsSecondInitializerSucceedsWithoutSelectorS
333332
Assert.Equal(DataSourceState.Valid, statusUpdates[6].State);
334333

335334
// Verify that the data source is initialized
336-
// TODO: uncomment this check once Initialized is implemented
337-
// Assert.True(dataSource.Initialized);
335+
Assert.True(dataSource.Initialized);
338336

339337
// Verify that Apply was called twice: once for second initializer, once for synchronizer
340338
// Verify the first Apply call was with second initializer dummy data
@@ -600,8 +598,7 @@ public async Task AllInitializersFailSwitchesToSynchronizers()
600598
Assert.Equal(DataSourceState.Valid, statusUpdates[4].State);
601599

602600
// Verify that the data source is initialized
603-
// TODO: uncomment this check once Initialized is implemented
604-
// Assert.True(dataSource.Initialized);
601+
Assert.True(dataSource.Initialized);
605602

606603
// Verify that Apply was called once with synchronizer dummy data
607604
var changeSet = capturingSink.Applies.ExpectValue(TimeSpan.FromSeconds(1));

0 commit comments

Comments
 (0)