Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSami Hiltunen <shiltunen@gitlab.com>2021-05-18 20:18:29 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2021-09-02 08:23:53 +0300
commit005b5f934cb53acaf2ba340b6bf9aa5ded7edec9 (patch)
treeb1140b03dcc8e7b078d0de6761382bd607df9d99
parentb5f6c05f13528ed90323113a3406fa29f2e7726c (diff)
Remove unneeded shouldSucceed fields in tests
The coordinator's transaction tests use the shouldSucceed field to indicate whether a node should successfully vote or not. It's only used if the node participates in the transaction as indicated by the shouldParticipate field. This commit removes some extraneous shouldSucceeds in preparation for refactoring the tests cases to support multiple subtransactions. (cherry picked from commit da722d572a38d7a3d29bbb30eccc159f3e792ab8)
-rw-r--r--internal/praefect/coordinator_pg_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/internal/praefect/coordinator_pg_test.go b/internal/praefect/coordinator_pg_test.go
index eb769eaa3..730090e24 100644
--- a/internal/praefect/coordinator_pg_test.go
+++ b/internal/praefect/coordinator_pg_test.go
@@ -99,8 +99,8 @@ func TestStreamDirectorMutator_Transaction(t *testing.T) {
// replication jobs.
desc: "unstarted transaction should create replication jobs",
nodes: []node{
- {primary: true, shouldSucceed: true, shouldGetRepl: false, expectedGeneration: 1},
- {primary: false, shouldSucceed: false, shouldGetRepl: true, expectedGeneration: 0},
+ {primary: true, shouldGetRepl: false, expectedGeneration: 1},
+ {primary: false, shouldGetRepl: true, expectedGeneration: 0},
},
},
{
@@ -109,10 +109,10 @@ func TestStreamDirectorMutator_Transaction(t *testing.T) {
// replication jobs.
desc: "unstarted transaction should create replication jobs for outdated node",
nodes: []node{
- {primary: true, shouldSucceed: true, shouldGetRepl: false, generation: 1, expectedGeneration: 2},
- {primary: false, shouldSucceed: false, shouldGetRepl: true, generation: 1, expectedGeneration: 1},
- {primary: false, shouldSucceed: false, shouldGetRepl: true, generation: 0, expectedGeneration: 0},
- {primary: false, shouldSucceed: false, shouldGetRepl: true, generation: datastore.GenerationUnknown, expectedGeneration: datastore.GenerationUnknown},
+ {primary: true, shouldGetRepl: false, generation: 1, expectedGeneration: 2},
+ {primary: false, shouldGetRepl: true, generation: 1, expectedGeneration: 1},
+ {primary: false, shouldGetRepl: true, generation: 0, expectedGeneration: 0},
+ {primary: false, shouldGetRepl: true, generation: datastore.GenerationUnknown, expectedGeneration: datastore.GenerationUnknown},
},
},
}