-
Notifications
You must be signed in to change notification settings - Fork 28
[AV-1117] *: clean up + basic e2e/integration tests #12
Conversation
|
You may be able to do this more easily using the testing style from We don't actually spin up an HTTP endpoint but instead interface with the VM directly (not on a running network). |
Thanks for the pointers. I like the approach of running local VMs, and will look into that after this big PR #9 is reviewed (trying to see if we can even mock VM). I believe there's still value in testing against real small network, considering them as blackbox. e.g., Send tx to node A, and make sure node B acks and agrees. I can work on these in parallel. |
vm: fix "IssueTx" reply Signed-off-by: Gyuho Lee <[email protected]>
Signed-off-by: Gyuho Lee <[email protected]>
Signed-off-by: Gyuho Lee <[email protected]>
|
|
||
| graffiti := uint64(0) | ||
| for ctx.Err() == nil { | ||
| valid, err := cli.CheckBlock(cbID) |
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 a future PR, we should do this more periodically to speed up the mining loop.
| return nil, err | ||
| } | ||
| d := pow.Difficulty(b) | ||
| est, err := cli.EstimateDifficulty() |
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 a future PR, we should do this more periodically to speed up the mining loop.
cmd/quarkcli/claim/claim.go
Outdated
| break | ||
| } | ||
| confirmed, err := cli.PollTx(ctx, txID) | ||
| cancel() |
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.
Do we explicitly need to cancel 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 would say this is just for a good practice in case PollTx spawns its own goroutine after returning. Technically, not needed.
| httpServer *httptest.Server | ||
| } | ||
|
|
||
| var _ = ginkgo.BeforeSuite(func() { |
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.
fancy fancy
Signed-off-by: Gyuho Lee <[email protected]>
Signed-off-by: Gyuho Lee <[email protected]>
Signed-off-by: Gyuho Lee <[email protected]>
Signed-off-by: Gyuho Lee <[email protected]>
Signed-off-by: Gyuho Lee <[email protected]>
| } | ||
| } | ||
|
|
||
| opts := []client.OpOption{client.WithPollTx()} |
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.
Fancy variadic functions
patrick-ogrady
left a comment
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.
LGTM
Uh oh!
There was an error while loading. Please reload this page.