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

orc tests: add more cases #6801

Merged
merged 1 commit into from
Sep 30, 2020
Merged

Conversation

deepthi
Copy link
Member

@deepthi deepthi commented Sep 30, 2020

Partial fix for #6769

Signed-off-by: deepthi [email protected]

Copy link
Contributor

@shlomi-noach shlomi-noach left a comment

Choose a reason for hiding this comment

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

looks good, some improvements suggested, not necessarily for this PR

err := curMaster.MysqlctlProcess.Stop()
require.NoError(t, err)

for _, tablet := range shard0.Vttablets {
Copy link
Contributor

Choose a reason for hiding this comment

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

where's the Sleep() now?

Copy link
Member Author

Choose a reason for hiding this comment

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

It is inside the call to checkMasterTablet

qr := runSQL(t, "select @@global.read_only", curMaster)
require.NotNil(t, qr)
require.Equal(t, 1, len(qr.Rows))
require.Equal(t, "[[INT64(0)]]", fmt.Sprintf("%s", qr.Rows), qr.Rows)
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

require.NotNil(t, qr)
require.Equal(t, 1, len(qr.Rows))
require.Equal(t, "[[INT64(1)]]", fmt.Sprintf("%s", qr.Rows), qr.Rows)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

// wait for repair
time.Sleep(15 * time.Second)
// check replication is setup correctly
checkReplication(t, clusterInstance, curMaster, []*cluster.Vttablet{replica})
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like these tests share a lot of code in common, the code should probably be refactored to provide a framework for setup-destroy-wait-expect cycle.

Copy link
Member Author

Choose a reason for hiding this comment

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

I moved as much as possible into createCluster and checkReplication. What is left is slightly different in each test case.
As we add more tests we can revisit and refactor.

@deepthi deepthi marked this pull request as ready for review September 30, 2020 22:12
@deepthi deepthi merged commit a016bfe into vitessio:master Sep 30, 2020
@deepthi deepthi deleted the ds-orc-test2 branch October 1, 2020 00:29
@askdba askdba added this to the v8.0 milestone Oct 6, 2020
@shlomi-noach shlomi-noach mentioned this pull request May 31, 2021
2 tasks
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.

3 participants