Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EBP-474: Test for large cached messages #92

Open
wants to merge 3 commits into
base: SOL-62456
Choose a base branch
from
Open

Conversation

TrentDaniel
Copy link

Cache request that require multiple messages (Get Next) in reply.

Copy link

gitstream-cm bot commented Feb 6, 2025

Please mark whether you used Copilot to assist coding in this PR

  • Copilot Assisted

Copy link

@oodigie oodigie left a comment

Choose a reason for hiding this comment

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

@TrentDaniel, I left some comments on the PR.

}
Expect(messagingService.Metrics().GetValue(metrics.CacheRequestsSent)).To(BeNumerically("==", 1))
Expect(messagingService.Metrics().GetValue(metrics.CacheRequestsSucceeded)).To(BeNumerically("==", 6))
Expect(messagingService.Metrics().GetValue(metrics.CacheRequestsFailed)).To(BeNumerically("==", 0))
Copy link

Choose a reason for hiding this comment

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

Please can you explain why there would be exactly 6 cache requests that succeeded? I don't see anywhere we send 6 cache requests.

ValidCachedMessageAge int32 = 5
ValidMaxCachedMessages int32 = 10
ValidCachedMessageAge int32 = 0
ValidMaxCachedMessages int32 = 0
Copy link

Choose a reason for hiding this comment

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

@TrentDaniel, I am just curious to know why these were set to zero?

Copy link

@sdewilde sdewilde left a comment

Choose a reason for hiding this comment

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

Couple questions on cleanup and what data we can check

err = receiver.AddSubscription(resource.TopicSubscriptionOf(publishTopic))
Expect(err).To(BeNil())
/* NOTE: Intiialize the cache with very large messages. This will be overwritten by the next test,
* so we don't need to worry about long messages causing other tests to take longer.
Copy link

Choose a reason for hiding this comment

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

What happens if you chose to run just a few random sections (like when splitting up CI vs RC tests). Should we be doing some cleanup?

for i := 0; i < numExpectedCacheMessages; i++ {
Eventually(receivedMsgChan, "5s").Should(Receive(&msg))
Expect(msg).ToNot(BeNil())
/* NOTE: Can't assert topic from received message because of wildcard in cache request. */
Copy link

Choose a reason for hiding this comment

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

We still have the publishTopic, can we use that? Or at least confirm some part of the topic matches?

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