diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2020-05-18 13:58:28 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2020-05-20 08:48:17 +0300 |
commit | 9950abc0de2e9ca4de82b04009553bac05f7f908 (patch) | |
tree | 44453fda39be191e98d762f88d5e72c2baf9fd7d /internal/praefect/transaction_test.go | |
parent | 4cd8d0c5614cafc3ca41f3473004adaeabc77e24 (diff) |
transactions: Rename `StartTransaction` to `VoteTransaction`
The `StartTransaction` RPC is really kind of misnamed in that it doesn't
convey what it actually does. Let's rename it to `VoteTransaction` to
make its actual intent clearer, which is to actually cast a vote for the
given transaction.
Diffstat (limited to 'internal/praefect/transaction_test.go')
-rw-r--r-- | internal/praefect/transaction_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/praefect/transaction_test.go b/internal/praefect/transaction_test.go index 30d4f685a..95e5b3a41 100644 --- a/internal/praefect/transaction_test.go +++ b/internal/praefect/transaction_test.go @@ -75,13 +75,13 @@ func TestTransactionSucceeds(t *testing.T) { hash := sha1.Sum([]byte{}) - response, err := client.StartTransaction(ctx, &gitalypb.StartTransactionRequest{ + response, err := client.VoteTransaction(ctx, &gitalypb.VoteTransactionRequest{ TransactionId: transactionID, Node: "node1", ReferenceUpdatesHash: hash[:], }) require.NoError(t, err) - require.Equal(t, gitalypb.StartTransactionResponse_COMMIT, response.State) + require.Equal(t, gitalypb.VoteTransactionResponse_COMMIT, response.State) verifyCounterMetrics(t, counter, counterMetrics{ registered: 1, @@ -112,7 +112,7 @@ func TestTransactionFailures(t *testing.T) { client := gitalypb.NewRefTransactionClient(cc) hash := sha1.Sum([]byte{}) - _, err := client.StartTransaction(ctx, &gitalypb.StartTransactionRequest{ + _, err := client.VoteTransaction(ctx, &gitalypb.VoteTransactionRequest{ TransactionId: 1, Node: "node1", ReferenceUpdatesHash: hash[:], @@ -143,7 +143,7 @@ func TestTransactionCancellation(t *testing.T) { cancelTransaction() hash := sha1.Sum([]byte{}) - _, err = client.StartTransaction(ctx, &gitalypb.StartTransactionRequest{ + _, err = client.VoteTransaction(ctx, &gitalypb.VoteTransactionRequest{ TransactionId: transactionID, Node: "node1", ReferenceUpdatesHash: hash[:], |