From c65f9676c559a4dfe79b7170cb403a58f5205961 Mon Sep 17 00:00:00 2001 From: Adam Wootton Date: Tue, 23 Apr 2024 12:19:39 -0400 Subject: [PATCH] fix unit tests --- client_test.go | 2 +- configmanager_test.go | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/client_test.go b/client_test.go index 58782186..39f6e6d6 100644 --- a/client_test.go +++ b/client_test.go @@ -554,7 +554,7 @@ func BenchmarkClient_VariableParallel(b *testing.B) { } if benchmarkEnableConfigUpdates && configCounter.Add(1)%10000 == 0 { go func() { - err = client.configManager.setConfig([]byte(test_large_config), "") + err = client.configManager.setConfig([]byte(test_large_config), "", "") setConfigCount.Add(1) }() } diff --git a/configmanager_test.go b/configmanager_test.go index 0267151c..af63dcb0 100644 --- a/configmanager_test.go +++ b/configmanager_test.go @@ -11,11 +11,13 @@ import ( type recordingConfigReceiver struct { configureCount int etag string + rayId string } -func (r *recordingConfigReceiver) StoreConfig(_ []byte, etag string) error { +func (r *recordingConfigReceiver) StoreConfig(_ []byte, etag string, rayId string) error { r.configureCount++ r.etag = etag + r.rayId = rayId return nil } @@ -27,6 +29,10 @@ func (r *recordingConfigReceiver) GetETag() string { return r.etag } +func (r *recordingConfigReceiver) GetRayId() string { + return r.rayId +} + func (r *recordingConfigReceiver) GetRawConfig() []byte { return nil }