-
Notifications
You must be signed in to change notification settings - Fork 116
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
itest: small fixes for tapd load test #869
Conversation
@@ -164,5 +164,5 @@ func mintTest(t *testing.T, ctx context.Context, cfg *Config) { | |||
}) | |||
require.True(t, correctOp) | |||
|
|||
itest.SyncUniverses(ctx, t, alice, bob, aliceHost, cfg.TestTimeout) |
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 think this should actually be bobHost
and not aliceHost
? IIUC alice is the client trying to sync to bob.
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.
No, I think this is correct. It was wrong before. Bob should be the client that syncs to Alice and for that it needs Alice's host address.
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.
There may be more than one correct way to set it up. The old mint
test used to have bob
add alice
as a federation server using bob.AddFederationServer(... something <aliceHost> ...)
, so I was just reverting to that approach. We could probably also get away with having alice
add bob
as the federation server.
Does the directionality of who adds whom matter? Alice is the node doing all the minting the way the tests are setup now.
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.
Directionality matters, yes. Because a sync currently is only pull. So Bob will fetch everything that Alice has. But if Bob has something that Alice doesn't I don't think that's currently pushed in the other direction.
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.
Thanks for the fixes. Tested them both locally and with a slight adjustment (see inline comment), this seems to work.
itest/utils.go
Outdated
@@ -158,7 +158,7 @@ func MineBlocks(t *testing.T, client *rpcclient.Client, | |||
) | |||
require.NoError(t, err) | |||
|
|||
case rpcclient.BtcdVersion: | |||
case *rpcclient.BtcdVersion: |
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.
It seems like this is NOT a pointer, while the BitcoindVersion
is (see itest that's currently broken). This is very very weird, no idea why. But I tested it locally with the load test and integration test, and it looks like that's really the case...
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 had to log the type
to see that it was a pointer in the bitcoind
case. Just assumed it would also be for the btcd
case. That is strange.
@@ -164,5 +164,5 @@ func mintTest(t *testing.T, ctx context.Context, cfg *Config) { | |||
}) | |||
require.True(t, correctOp) | |||
|
|||
itest.SyncUniverses(ctx, t, alice, bob, aliceHost, cfg.TestTimeout) |
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.
No, I think this is correct. It was wrong before. Bob should be the client that syncs to Alice and for that it needs Alice's host address.
f0e0c78
to
8c81292
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.
Thanks, LGTM 🎉
@@ -147,7 +147,7 @@ func MineBlocks(t *testing.T, client *rpcclient.Client, | |||
var blockHashes []*chainhash.Hash | |||
|
|||
switch backend.(type) { | |||
case rpcclient.BitcoindVersion: | |||
case *rpcclient.BitcoindVersion: |
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.
Maybe we should add a comment here? Otherwise someone looking at this will definitely think one of them is wrong...
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.
aren't both meant to be pointers?
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.
Nope, apparently they're not, which is very weird...
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, tACK
When building images off the main branch, I found that the load test pod was incapable of correctly determining the bitcoind backend version:
Also, encountered the following error:
We used to run the following in the
mint
test:So we can just update the
itest.SyncUniverses(...)
call to maintain this behavior.