示例#1
0
func agentRPCTestPromoteSlavePanic(ctx context.Context, t *testing.T, client tmclient.TabletManagerClient, tablet *topodatapb.Tablet) {
	_, err := client.PromoteSlave(ctx, tablet)
	expectRPCWrapLockActionPanic(t, err)
}
示例#2
0
func agentRPCTestPromoteSlavePanic(ctx context.Context, t *testing.T, client tmclient.TabletManagerClient, tablet *topodatapb.Tablet) {
	_, err := client.PromoteSlave(ctx, tablet)
	expectHandleRPCPanic(t, "PromoteSlave", true /*verbose*/, err)
}
示例#3
0
func agentRPCTestPromoteSlave(ctx context.Context, t *testing.T, client tmclient.TabletManagerClient, tablet *topodatapb.Tablet) {
	rp, err := client.PromoteSlave(ctx, tablet)
	compareError(t, "PromoteSlave", err, rp, testReplicationPosition)
}
示例#4
0
func agentRpcTestPromoteSlave(t *testing.T, client tmclient.TabletManagerClient, ti *topo.TabletInfo) {
	rsd, err := client.PromoteSlave(ti, time.Minute)
	compareError(t, "PromoteSlave", err, rsd, testRestartSlaveData)
}