mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-21 08:31:27 -05:00
test: remove performance sensitive test
A test must not fail depending on the performance of the machine it runs on. It creates false negative and serves no purpose. These are not benchmark tests for the hardware running them.
This commit is contained in:
parent
e19be90a6b
commit
11596374ba
1 changed files with 0 additions and 13 deletions
13
modules/cache/cache_test.go
vendored
13
modules/cache/cache_test.go
vendored
|
@ -9,7 +9,6 @@ import (
|
|||
"time"
|
||||
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
"code.gitea.io/gitea/modules/test"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
@ -35,18 +34,6 @@ func TestNewContext(t *testing.T) {
|
|||
assert.Nil(t, con)
|
||||
}
|
||||
|
||||
func TestTest(t *testing.T) {
|
||||
defer test.MockVariableValue(&conn, nil)()
|
||||
_, err := Test()
|
||||
assert.Error(t, err)
|
||||
|
||||
createTestCache()
|
||||
elapsed, err := Test()
|
||||
assert.NoError(t, err)
|
||||
// mem cache should take from 300ns up to 1ms on modern hardware ...
|
||||
assert.Less(t, elapsed, SlowCacheThreshold)
|
||||
}
|
||||
|
||||
func TestGetCache(t *testing.T) {
|
||||
createTestCache()
|
||||
|
||||
|
|
Loading…
Reference in a new issue