Skip to content

fix type conversion issues#10

Merged
cbrady merged 2 commits intomainfrom
chris/sch-4649-fix-issue-with-marshaling-flags-from-datastream
Oct 2, 2025
Merged

fix type conversion issues#10
cbrady merged 2 commits intomainfrom
chris/sch-4649-fix-issue-with-marshaling-flags-from-datastream

Conversation

@cbrady
Copy link
Collaborator

@cbrady cbrady commented Sep 30, 2025

No description provided.

@cbrady cbrady self-assigned this Sep 30, 2025
@cbrady cbrady requested review from a team as code owners September 30, 2025 20:00
@cbrady cbrady force-pushed the chris/sch-4649-fix-issue-with-marshaling-flags-from-datastream branch from ca02326 to 1553990 Compare October 1, 2025 17:53
@cbrady cbrady force-pushed the chris/sch-4649-fix-issue-with-marshaling-flags-from-datastream branch from 1553990 to cb19021 Compare October 1, 2025 18:00
Comment on lines +212 to +216
logger := NewSchematicLogger()
mockCompanyCache := NewMockBatchCacheProvider[*rulesengine.Company]()
mockUserCache := NewMockBatchCacheProvider[*rulesengine.User]()
mockFlagCache := NewMockCacheProvider[*rulesengine.Flag]()
config := createTestAsyncConfig()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this style

}

// Wait for batch processing
time.Sleep(100 * time.Millisecond)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not going to block this PR, but we could perhaps invert this by giving the mock service a channel

assert.NoError(t, <-mockUserCache.Done())  // done or timeout


// Use very short timeout to test timeout scenario
shutdownCtx, cancel := context.WithTimeout(context.Background(), 10*time.Millisecond)
defer cancel()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably doesn't matter, but I think t.Cleanup is a better choice here.

)

// MockBatchCacheProvider extends MockCacheProvider with batch operations
type MockBatchCacheProvider[T any] struct {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add timeout/cancelation machinery to this struct (and its constructor)?

@dontlaugh dontlaugh dismissed their stale review October 1, 2025 21:15

No blockers from me

@cbrady cbrady merged commit 21ee939 into main Oct 2, 2025
6 checks passed
@cbrady cbrady deleted the chris/sch-4649-fix-issue-with-marshaling-flags-from-datastream branch October 2, 2025 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants