mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-11-01 06:50:00 +00:00
[chore] Comment out silly, frequently-failing GetStatusTwice
test (#2656)
* [chore] Comment out silly, frequently-failing `GetStatusTwice` test * lord
This commit is contained in:
parent
40f9eefc21
commit
b14cd645f9
1 changed files with 9 additions and 1 deletions
|
@ -19,7 +19,6 @@
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@ -144,6 +143,14 @@ func (suite *StatusTestSuite) TestGetStatusWithMention() {
|
||||||
suite.True(*status.Likeable)
|
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() {
|
func (suite *StatusTestSuite) TestGetStatusTwice() {
|
||||||
before1 := time.Now()
|
before1 := time.Now()
|
||||||
_, err := suite.db.GetStatusByURI(context.Background(), suite.testStatuses["local_account_1_status_1"].URI)
|
_, 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
|
// second retrieval should be several orders faster since it will be cached now
|
||||||
suite.Less(duration2, duration1)
|
suite.Less(duration2, duration1)
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
func (suite *StatusTestSuite) TestGetStatusReplies() {
|
func (suite *StatusTestSuite) TestGetStatusReplies() {
|
||||||
targetStatus := suite.testStatuses["local_account_1_status_1"]
|
targetStatus := suite.testStatuses["local_account_1_status_1"]
|
||||||
|
|
Loading…
Reference in a new issue