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

pd: parse ALREADY_BOOTSTRAPPED error. #1720

Merged
merged 3 commits into from
Apr 5, 2017

Conversation

disksing
Copy link
Contributor

@disksing disksing commented Apr 1, 2017

No description provided.

@disksing disksing requested review from siddontang and overvenus April 1, 2017 04:14
#[derive(Debug)]
pub struct Bootstrap {}

impl Bootstrap {
Copy link
Contributor

Choose a reason for hiding this comment

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

AlreadyBootstrap

@siddontang
Copy link
Contributor

can we test bootstrap_cluster in node.rs?

@disksing
Copy link
Contributor Author

disksing commented Apr 1, 2017

@siddontang In node.rs, tests are using TestPdClient which returns Error::ClusterBootstrapped correctly, see https://github.com/pingcap/tikv/blob/083b54a39b69a81158f1946c5ebc89fb3d5a7807/tests/raftstore/pd.rs#L502 , so I don't think we need to add another test for it.

@siddontang
Copy link
Contributor

LGTM

@siddontang
Copy link
Contributor

PTAL @BusyJay @overvenus

@zhangjinpeng87
Copy link
Member

LGTM

@siddontang siddontang merged commit f82f35b into master Apr 5, 2017
@siddontang siddontang deleted the disksing/already-bootstrapped branch April 5, 2017 02:59
@@ -69,6 +69,30 @@ fn test_rpc_client() {
}

#[test]
fn test_reboot() {
let mut eps = vec![
"http://127.0.0.1:52730".to_owned(),
Copy link
Member

Choose a reason for hiding this comment

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

Should indent 4 more space.


let client = RpcClient::new(&eps.pop().unwrap()).unwrap();

assert_eq!(client.is_cluster_bootstrapped().unwrap(), false);
Copy link
Member

Choose a reason for hiding this comment

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

Use assert instead.

iosmanthus pushed a commit to iosmanthus/tikv that referenced this pull request Oct 17, 2024
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.

4 participants