[#1634] node: Change default epoch in tests

Do not treat objects with expiration as expired by default.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2022-09-09 13:27:15 +03:00 committed by LeL
parent edef26a4fd
commit beb7f2a048
5 changed files with 5 additions and 10 deletions

View file

@ -2,7 +2,6 @@ package engine
import ( import (
"fmt" "fmt"
"math"
"os" "os"
"path/filepath" "path/filepath"
"testing" "testing"
@ -31,7 +30,7 @@ import (
type epochState struct{} type epochState struct{}
func (s epochState) CurrentEpoch() uint64 { func (s epochState) CurrentEpoch() uint64 {
return math.MaxUint64 return 0
} }
func BenchmarkExists(b *testing.B) { func BenchmarkExists(b *testing.B) {

View file

@ -1,7 +1,6 @@
package meta_test package meta_test
import ( import (
"math"
"os" "os"
"strconv" "strconv"
"testing" "testing"
@ -29,7 +28,7 @@ func (s epochState) CurrentEpoch() uint64 {
return s.e return s.e
} }
return math.MaxUint64 return 0
} }
// saves "big" object in DB. // saves "big" object in DB.

View file

@ -4,7 +4,6 @@ import (
"encoding/binary" "encoding/binary"
"errors" "errors"
"fmt" "fmt"
"math"
"path/filepath" "path/filepath"
"testing" "testing"
@ -15,7 +14,7 @@ import (
type epochStateImpl struct{} type epochStateImpl struct{}
func (s epochStateImpl) CurrentEpoch() uint64 { func (s epochStateImpl) CurrentEpoch() uint64 {
return math.MaxUint64 return 0
} }
func TestVersion(t *testing.T) { func TestVersion(t *testing.T) {

View file

@ -1,7 +1,6 @@
package shard package shard
import ( import (
"math"
"os" "os"
"path/filepath" "path/filepath"
"testing" "testing"
@ -28,7 +27,7 @@ import (
type epochState struct{} type epochState struct{}
func (s epochState) CurrentEpoch() uint64 { func (s epochState) CurrentEpoch() uint64 {
return math.MaxUint64 return 0
} }
func TestShardOpen(t *testing.T) { func TestShardOpen(t *testing.T) {

View file

@ -2,7 +2,6 @@ package shard_test
import ( import (
"crypto/sha256" "crypto/sha256"
"math"
"math/rand" "math/rand"
"path/filepath" "path/filepath"
"testing" "testing"
@ -30,7 +29,7 @@ import (
type epochState struct{} type epochState struct{}
func (s epochState) CurrentEpoch() uint64 { func (s epochState) CurrentEpoch() uint64 {
return math.MaxUint64 return 0
} }
func newShard(t testing.TB, enableWriteCache bool) *shard.Shard { func newShard(t testing.TB, enableWriteCache bool) *shard.Shard {