-
Notifications
You must be signed in to change notification settings - Fork 33
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
[Persistence] Adds atomic Update for TreeStore #861
Conversation
3f68ff0
to
2d9022f
Compare
7ee9be3
to
6030ada
Compare
6030ada
to
a7ba81a
Compare
persistence/trees/trees_test.go
Outdated
} | ||
|
||
// createMockBus returns a mock bus with stubbed out functions for bus registration | ||
func createMockBus(t *testing.T, runtimeMgr modules.RuntimeMgr) *mockModules.MockBus { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: I would consider moving all these helpers to a file named trees_utils_test.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dylanlott Thoughts on this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather create an issue with a TECHDEBT
comment. There's no easy answer to this without answering larger questions around import cycles and how modules should be imported.
26b1e44
to
ef4ed4d
Compare
ef4ed4d
to
be56f6a
Compare
3741a01
to
7165f7c
Compare
be56f6a
to
f0c6203
Compare
7165f7c
to
6181db1
Compare
1cfec18
to
2d53dc1
Compare
29ad7df
to
0f87f0b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few last minute nits and then it should be g2g.
@dylanlott Can you please merge with main
and resolve conflicts to avoid a force push? It allows the reviewer to review changes since last review
. Ty!
//go:build test | ||
|
||
package trees |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In persistence/trees/trees_test.go
, we use package trees_test
and not have the //go:build test
tag.
Here, we have the package trees
and do have the //go:build test
tag.
Feels inconsistent, but not sure if this is general best practice for main_test
.go` vs non-main test files?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was following the prescription of TestUtils for testing unexported members like previously discussed.
} | ||
} | ||
|
||
// TODO_AFTER(#861): Implement this test with the test suite available in #861 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test suite available in #861
is this correct?
We want to use the test suite in this PR to implement it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that's what @h5law meant out of this, yes.
nodeStore: nodeStore, | ||
} | ||
// TECHDEBT(#796): Test helpers should be consolidated in a single place | ||
func newTestApp(t *testing.T) *core_types.Actor { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OPTIONAL: Per @h5law's comment, we could move the helpers into a separate utils_test.go
but don't feel strongly about it.
Co-authored-by: Daniel Olshansky <[email protected]>
Description
Adds atomic savepoint and rollback creation to the TreeStore
Issue
Relates to #562
Type of change
Please mark the relevant option(s):
List of changes
Testing
make develop_test
; if any code changes were mademake test_e2e
on k8s LocalNet; if any code changes were madee2e-devnet-test
passes tests on DevNet; if any code was changedRequired Checklist
godoc
format comments on touched members (see: tip.golang.org/doc/comment)If Applicable Checklist
shared/docs/*
if I updatedshared/*
README(s)