func agentRPCTestSetReadOnly(ctx context.Context, t *testing.T, client tmclient.TabletManagerClient, tablet *topodatapb.Tablet) { testSetReadOnlyExpectedValue = true err := client.SetReadOnly(ctx, tablet) if err != nil { t.Errorf("SetReadOnly failed: %v", err) } testSetReadOnlyExpectedValue = false err = client.SetReadWrite(ctx, tablet) if err != nil { t.Errorf("SetReadWrite failed: %v", err) } }
func agentRpcTestSetReadOnly(t *testing.T, client tmclient.TabletManagerClient, ti *topo.TabletInfo) { testSetReadOnlyExpectedValue = true err := client.SetReadOnly(ti, time.Minute) if err != nil { t.Errorf("SetReadOnly failed: %v", err) } testSetReadOnlyExpectedValue = false err = client.SetReadWrite(ti, time.Minute) if err != nil { t.Errorf("SetReadWrite failed: %v", err) } }
func agentRPCTestSetReadOnlyPanic(ctx context.Context, t *testing.T, client tmclient.TabletManagerClient, tablet *topodatapb.Tablet) { err := client.SetReadOnly(ctx, tablet) expectRPCWrapLockActionPanic(t, err) }
func agentRPCTestSetReadOnlyPanic(ctx context.Context, t *testing.T, client tmclient.TabletManagerClient, tablet *topodatapb.Tablet) { err := client.SetReadOnly(ctx, tablet) expectHandleRPCPanic(t, "SetReadOnly", true /*verbose*/, err) err = client.SetReadWrite(ctx, tablet) expectHandleRPCPanic(t, "SetReadWrite", true /*verbose*/, err) }