Skip to content

Commit

Permalink
fix: set sample tests for limit=0 based on new server behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
cprice404 committed Mar 7, 2024
1 parent 88598e5 commit 43f4e56
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tests/Integration/Momento.Sdk.Tests/SetTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
{
Expand Down

0 comments on commit 43f4e56

Please sign in to comment.