Skip to content

bench: isolate scalar tests#548

Merged
trekhopton merged 14 commits intomainfrom
isolate-scalar-tests
Apr 29, 2025
Merged

bench: isolate scalar tests#548
trekhopton merged 14 commits intomainfrom
isolate-scalar-tests

Conversation

@trekhopton
Copy link
Copy Markdown
Collaborator

@trekhopton trekhopton commented Apr 28, 2025

This was done to make them more reliable and not depend on others tests. This means the get and fetch tests will take longer, but to fix that we could do a multi put.

Closes #542

trekhopton and others added 9 commits April 17, 2025 00:02
This was done for a more readable flow of API handlers.

This is in preparation for adding more API handlers, specifically for enhanced camera log viewing.
This was done so that the test wouldn't panic when it fails.
It's still unclear why it failed and is now passing.
The intention here is to improve the function of events that
represent erroneous conditions and make error information
more available and clearer. We're also trying to use more
consistent patterns around error conditions, and do more
central notification on these error events.

Events representing erroneous conditions are errors themselves.
They also hold errors instead of basic strings. This means we
can chain error events/errors and maintain a history of the
errors that led us to where we are. As such we have unwrapping
functionality to find the initial error event type. We've also added
a Kind() method to the interface that gives us the corresponding notify.Kind so that we can perform a notification of the correct
kind.

Finally we've fixed some fundemental issues around
storing events for processing; we weren't properly storing the
error events internal error information, and would therefore
loose this on the next SM tick.
This was done because the errors in question mean the test cannot meaningfully continue. This prevents a panic.
bench: fix TestGetScalars panic
This was done to make them more reliable and not depend on others tests.
This meaning the get and fetch tests will take longer but to fix that we could do a multi put.
Copy link
Copy Markdown
Member

@ao-david ao-david left a comment

Choose a reason for hiding this comment

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

This needs a rebase before merging, as I think that commits from a different change have made their way in. But otherwise LGTM

cmd/decode/*
cmd/cloudblue/*
cmd/oceancast/*
cmd/roadmap/* No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

do we not want to commit this?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

No harm in adding to the ignore file I think. I know they're experimental projects that aren't on main but my thinking was, why not add them? It helps me deploy more cleanly because I don't want to get rid of some of those project folders.


// Print progress every 10%.
if i%(minutesInDay/10) == 0 {
t.Logf("put %d/%d scalars", i, minutesInDay)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we really need this log? There is already a lot of logging in the test suite which can make it hard to find what failed

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Because this is a long running test, I think it's useful, it only results in 10 logs since it only does 10% increments, that's fine IMO.

@trekhopton trekhopton merged commit 18577fd into main Apr 29, 2025
1 check passed
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.

bench: TestGetScalars fails on main when run locally

3 participants