From cb87bc0161cc300635b490723809c1b7557b0018 Mon Sep 17 00:00:00 2001 From: YongAn Date: Sat, 4 Jun 2022 21:24:46 +0800 Subject: [PATCH] modify test case --- integrations/session_delete_test.go | 2 +- integrations/session_get_test.go | 2 +- integrations/session_update_test.go | 7 +++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/integrations/session_delete_test.go b/integrations/session_delete_test.go index 18b29102..cc081707 100644 --- a/integrations/session_delete_test.go +++ b/integrations/session_delete_test.go @@ -199,7 +199,7 @@ func TestShadowCacheDelete(t *testing.T) { assert.NoError(t, err) testEngine.ShowSQL(true) _, err = testEngine.NewSession().Exec("CREATE DATABASE IF NOT EXISTS shadow_test") - testEngine.SetShadow(dialects.NewTrueShadow()) + testEngine.SetShadow(dialects.NewFalseShadow()) oldCacher := testEngine.GetDefaultCacher() cacher := caches.NewLRUCacher(caches.NewMemoryStore(), 1000) diff --git a/integrations/session_get_test.go b/integrations/session_get_test.go index 168f631e..ee7602fd 100644 --- a/integrations/session_get_test.go +++ b/integrations/session_get_test.go @@ -38,7 +38,7 @@ func TestShadowGetVar(t *testing.T) { Money float32 Created time.Time `xorm:"created"` } - testEngine.SetShadow(dialects.NewTrueShadow()) + testEngine.SetShadow(dialects.NewFalseShadow()) assert.NoError(t, testEngine.Context(context.Background()).Sync(new(GetVar))) diff --git a/integrations/session_update_test.go b/integrations/session_update_test.go index 89c39359..1a91fa2e 100644 --- a/integrations/session_update_test.go +++ b/integrations/session_update_test.go @@ -7,13 +7,12 @@ package integrations import ( "context" "fmt" + "github.com/stretchr/testify/assert" "sync" "testing" "time" - "xorm.io/xorm/dialects" - - "github.com/stretchr/testify/assert" "xorm.io/xorm" + "xorm.io/xorm/dialects" "xorm.io/xorm/internal/statements" "xorm.io/xorm/internal/utils" "xorm.io/xorm/names" @@ -1478,7 +1477,7 @@ func TestShadowUpdate1(t *testing.T) { assert.NoError(t, err) testEngine.ShowSQL(true) _, err = testEngine.NewSession().Exec("CREATE DATABASE IF NOT EXISTS shadow_test") - testEngine.SetShadow(dialects.NewTrueShadow()) + testEngine.SetShadow(dialects.NewFalseShadow()) assert.NoError(t, testEngine.Context(context.Background()).Sync(&Userinfo{})) _, err = testEngine.Insert(&Userinfo{