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

Testing of multiple heartbeat properties #1158

Open
saurabhagrawal-86 opened this issue Jan 5, 2022 · 1 comment
Open

Testing of multiple heartbeat properties #1158

saurabhagrawal-86 opened this issue Jan 5, 2022 · 1 comment

Comments

@saurabhagrawal-86
Copy link

If my activity stores multiple properties in the heartbeat, how do I test it? In the cadence client, the RecordHeartbeat and GetHeartbeatDetails are variadic functions, i.e. we can record multiple details in the heartbeat. However, the TestActivityEnvironment.SetHeartbeatDetails() accepts only a single argument. Is this intentional? As a workaround, I could model the properties in a "container" struct, but I would like to avoid it if possible.

@Groxx
Copy link
Contributor

Groxx commented Mar 29, 2023

yeah, that's an inconsistency we should address 🤔
that said, tbh I'd much prefer to get rid of all multi-value APIs like this. they're significantly harder to make changes to, because you can't safely modify the number of arguments. the container-struct is significantly better in that respect.

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

No branches or pull requests

2 participants