Fix flaky test

This commit is contained in:
Anton Medvedev
2023-08-24 11:18:45 +02:00
parent 46929e4646
commit 9c328f151e
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -178,7 +178,7 @@ func Benchmark_filterMap(b *testing.B) {
Ints []int
}
env := Env{
Ints: make([]int, 1000),
Ints: make([]int, 100),
}
for i := 1; i <= len(env.Ints); i++ {
env.Ints[i-1] = i
@@ -195,7 +195,7 @@ func Benchmark_filterMap(b *testing.B) {
b.StopTimer()
require.NoError(b, err)
require.Len(b, out.([]interface{}), 142)
require.Len(b, out.([]interface{}), 14)
require.Equal(b, 14, out.([]interface{})[0])
}
+1 -1
View File
@@ -65,7 +65,7 @@ func TestBuiltin(t *testing.T) {
{`fromJSON("[1, 2, 3]")`, []interface{}{1.0, 2.0, 3.0}},
{`toBase64("hello")`, "aGVsbG8="},
{`fromBase64("aGVsbG8=")`, "hello"},
{`now().Format("2006-01-02T15:04:05Z")`, time.Now().Format("2006-01-02T15:04:05Z")},
{`now().Format("2006-01-02T15:04Z")`, time.Now().Format("2006-01-02T15:04Z")},
{`duration("1h")`, time.Hour},
{`date("2006-01-02T15:04:05Z")`, time.Date(2006, 1, 2, 15, 4, 5, 0, time.UTC)},
{`date("2006.01.02", "2006.01.02")`, time.Date(2006, 1, 2, 0, 0, 0, 0, time.UTC)},