<commit_before>// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package mysqlctl

import (
	"testing"
)

func TestStartShutdown(t *testing.T) {
	mycnf0 := NewMycnf(0, 3700, VtReplParams{})
	mycnf1 := NewMycnf(1, 3701, VtReplParams{})
	tablet0 := NewMysqld(mycnf0, DefaultDbaParams, DefaultReplParams)
	tablet1 := NewMysqld(mycnf1, DefaultDbaParams, DefaultReplParams)
	var err error

	err = Init(tablet0)
	if err != nil {
		t.Fatalf("Init(0) err: %v", err)
	}

	err = Init(tablet1)
	if err != nil {
		t.Fatalf("Init(1) err: %v", err)
	}

	err = Shutdown(tablet0, true)
	if err != nil {
		t.Fatalf("Shutdown() err: %v", err)
	}

	err = Start(tablet0)
	if err != nil {
		t.Fatalf("Start() err: %v", err)
	}

	err = Teardown(tablet0, false)
	if err != nil {
		t.Fatalf("Teardown(0) err: %v", err)
	}
	err = Teardown(tablet1, false)
	if err != nil {
		t.Fatalf("Teardown(1) err: %v", err)
	}
}<commit_msg>Fixing this test I broke earlier.<commit_after>// Copyright 2012, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package mysqlctl

import (
	"testing"
)

func TestStartShutdown(t *testing.T) {
	mycnf0 := NewMycnf(0, 3700, VtReplParams{})
	mycnf1 := NewMycnf(1, 3701, VtReplParams{})
	tablet0 := NewMysqld(mycnf0, DefaultDbaParams, DefaultReplParams)
	tablet1 := NewMysqld(mycnf1, DefaultDbaParams, DefaultReplParams)
	var err error

	err = Init(tablet0)
	if err != nil {
		t.Fatalf("Init(0) err: %v", err)
	}

	err = Init(tablet1)
	if err != nil {
		t.Fatalf("Init(1) err: %v", err)
	}

	err = Shutdown(tablet0, true, MysqlWaitTime)
	if err != nil {
		t.Fatalf("Shutdown() err: %v", err)
	}

	err = Start(tablet0, MysqlWaitTime)
	if err != nil {
		t.Fatalf("Start() err: %v", err)
	}

	err = Teardown(tablet0, false)
	if err != nil {
		t.Fatalf("Teardown(0) err: %v", err)
	}
	err = Teardown(tablet1, false)
	if err != nil {
		t.Fatalf("Teardown(1) err: %v", err)
	}
}
{'fraction_non_alphanumeric': 0.1532882011605416, 'fraction_numerical': 0.029013539651837523, 'mean_word_length': 3.961630695443645, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3076369', 'n_tokens_mistral': 895, 'n_tokens_neox': 861, 'n_words': 227}