summaryrefslogtreecommitdiff
path: root/internal/db/bundb/status_test.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2024-02-18 11:04:02 +0100
committerLibravatar GitHub <noreply@github.com>2024-02-18 11:04:02 +0100
commitb14cd645f9e84c88cbf1d0ea6532e10e571ac1fe (patch)
tree2b8b479218255b0ac30895b6ca5289aed6c7cc16 /internal/db/bundb/status_test.go
parent[bugfix] Fix dereferencing ancestors on new status create (#2652) (diff)
downloadgotosocial-b14cd645f9e84c88cbf1d0ea6532e10e571ac1fe.tar.xz
[chore] Comment out silly, frequently-failing `GetStatusTwice` test (#2656)
* [chore] Comment out silly, frequently-failing `GetStatusTwice` test * lord
Diffstat (limited to 'internal/db/bundb/status_test.go')
-rw-r--r--internal/db/bundb/status_test.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/internal/db/bundb/status_test.go b/internal/db/bundb/status_test.go
index 2129aa0e8..4f0db5e2c 100644
--- a/internal/db/bundb/status_test.go
+++ b/internal/db/bundb/status_test.go
@@ -19,7 +19,6 @@ package bundb_test
import (
"context"
- "fmt"
"testing"
"time"
@@ -144,6 +143,14 @@ func (suite *StatusTestSuite) TestGetStatusWithMention() {
suite.True(*status.Likeable)
}
+// The below test was originally used to ensure that a second
+// fetch is faster than a first fetch of a status, because in
+// the second fetch it should be cached. However because we
+// always run in-memory tests anyway, sometimes the first fetch
+// is actually faster, which causes CI/CD to fail unpredictably.
+// Since we know by now (Feb 2024) that the cache works fine,
+// the test is commented out.
+/*
func (suite *StatusTestSuite) TestGetStatusTwice() {
before1 := time.Now()
_, err := suite.db.GetStatusByURI(context.Background(), suite.testStatuses["local_account_1_status_1"].URI)
@@ -162,6 +169,7 @@ func (suite *StatusTestSuite) TestGetStatusTwice() {
// second retrieval should be several orders faster since it will be cached now
suite.Less(duration2, duration1)
}
+*/
func (suite *StatusTestSuite) TestGetStatusReplies() {
targetStatus := suite.testStatuses["local_account_1_status_1"]