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:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2020-07-15 09:12:42 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2020-07-15 09:12:42 +0300
commit4d6b3005748e023cf87bc27813ae2f316d745c6a (patch)
treef6a1a9962452f5017499193a2fcccfff734e6253
parent374e31b4924c5723748fbfb02856a8e1fc6406bd (diff)
transactions: Fix metrics tests failing
In commit 6ca7e976 (transactions: Scale registered metric by registered voters, 2020-07-14), we changed the "registered" metric for transactons to be scaled by the voter count. Due to a semantic merge conflict, this now causes tests to fail that have been added in afba66a3 (transactions: Expose info about voting outcomes, 2020-07-06). Let's fix this by correctly scaling metrics as expected in transaction tests.
-rw-r--r--internal/praefect/transaction_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/praefect/transaction_test.go b/internal/praefect/transaction_test.go
index ed9f8ed77..55882f588 100644
--- a/internal/praefect/transaction_test.go
+++ b/internal/praefect/transaction_test.go
@@ -490,7 +490,7 @@ func TestTransactionCancellation(t *testing.T) {
{votes: 1, showsUp: false, shouldSucceed: false},
},
threshold: 2,
- expectedMetrics: counterMetrics{registered: 1, committed: 0},
+ expectedMetrics: counterMetrics{registered: 2, committed: 0},
},
{
desc: "two nodes with unweighted node failing",
@@ -499,7 +499,7 @@ func TestTransactionCancellation(t *testing.T) {
{votes: 0, showsUp: false, shouldSucceed: false},
},
threshold: 1,
- expectedMetrics: counterMetrics{registered: 1, started: 1, committed: 1},
+ expectedMetrics: counterMetrics{registered: 2, started: 1, committed: 1},
},
{
desc: "multiple weighted votes with subset failing",
@@ -509,7 +509,7 @@ func TestTransactionCancellation(t *testing.T) {
{votes: 1, showsUp: false, shouldSucceed: false},
},
threshold: 2,
- expectedMetrics: counterMetrics{registered: 1, started: 2, committed: 2},
+ expectedMetrics: counterMetrics{registered: 3, started: 2, committed: 2},
},
}