From 5c1b2cd6bd0768bc9c2b5b4c22133620abf608e3 Mon Sep 17 00:00:00 2001 From: XuPeng-SH Date: Sun, 15 Dec 2024 18:54:04 +0800 Subject: [PATCH] update 19 --- pkg/vm/engine/tae/db/test/db_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/vm/engine/tae/db/test/db_test.go b/pkg/vm/engine/tae/db/test/db_test.go index bd3d14128afde..ba481f57d3f93 100644 --- a/pkg/vm/engine/tae/db/test/db_test.go +++ b/pkg/vm/engine/tae/db/test/db_test.go @@ -10531,12 +10531,14 @@ func Test_BasicTxnModeSwitch(t *testing.T) { assert.NoError(t, err) assert.True(t, tae.IsWriteMode()) assert.True(t, tae.TxnMgr.IsWriteMode()) + assert.Error(t, db.CheckCronJobs(tae.DB, db.DBTxnMode_Replay)) } func Test_OpenReplayDB1(t *testing.T) { ctx := context.Background() opts := config.WithLongScanAndCKPOpts(nil) tae := testutil.NewReplayTestEngine(ctx, ModuleName, t, opts) + defer tae.Close() assert.True(t, tae.IsReplayMode()) assert.True(t, tae.TxnMgr.IsReplayMode()) for name, spec := range db.CronJobs_Spec { @@ -10544,5 +10546,6 @@ func Test_OpenReplayDB1(t *testing.T) { assert.Error(t, db.AddCronJob(tae.DB, name, false)) } } - defer tae.Close() + assert.Error(t, db.AddCronJob(tae.DB, "unknown", false)) + assert.Error(t, db.CheckCronJobs(tae.DB, db.DBTxnMode_Write)) }