Skip to content

Commit

Permalink
update 19
Browse files Browse the repository at this point in the history
  • Loading branch information
XuPeng-SH committed Dec 15, 2024
1 parent 35707a8 commit 5c1b2cd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/vm/engine/tae/db/test/db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10531,18 +10531,21 @@ 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 {
if !spec[2] {
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))
}

0 comments on commit 5c1b2cd

Please sign in to comment.