From 43f4e5613842702b376d0605d228967376bef443 Mon Sep 17 00:00:00 2001 From: Chris Price Date: Thu, 7 Mar 2024 11:31:54 -0800 Subject: [PATCH] fix: set sample tests for limit=0 based on new server behavior --- tests/Integration/Momento.Sdk.Tests/SetTest.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/Integration/Momento.Sdk.Tests/SetTest.cs b/tests/Integration/Momento.Sdk.Tests/SetTest.cs index 0c562e5e..38460569 100644 --- a/tests/Integration/Momento.Sdk.Tests/SetTest.cs +++ b/tests/Integration/Momento.Sdk.Tests/SetTest.cs @@ -616,12 +616,8 @@ public async Task SetSampleAsync_UsesCachedStringSet_HappyPath() Assert.True(allValues.SetEquals(limitGreaterThanSetSizeHitValues), $"Expected sample with with limit greater than set size to return the entire set; expected ({String.Join(", ", allValues)}), got ({String.Join(", ", limitGreaterThanSetSizeHitValues)})"); CacheSetSampleResponse limitZeroResponse = await client.SetSampleAsync(cacheName, setName, 0); - // TODO: for now the server is returning a MISS for this. We will are updating that behavior and will need to fix this - // test accordingly, but this is an edge case that we don't need to block the SDK release on so we can fix the test - // once the server behavior changes. - Assert.True(limitZeroResponse is CacheSetSampleResponse.Miss, $"Unexpected response: {limitZeroResponse}"); - // var limitZeroHitValues = ((CacheSetSampleResponse.Hit)limitZeroResponse).ValueSetString; - // Assert.True(allValues.SetEquals(limitZeroHitValues), $"Expected sample with with limit zero to return the entire set; expected ({allValues}), got ({limitZeroHitValues})"); + var limitZeroHitValues = ((CacheSetSampleResponse.Hit)limitZeroResponse).ValueSetString; + Assert.True(allValues.SetEquals(limitZeroHitValues), $"Expected sample with with limit zero to return the entire set; expected ({allValues}), got ({limitZeroHitValues})"); for (int i = 0; i < 10; i++) {