Skip to content

Commit

Permalink
Add test for information_schema.CLUSTER_INFO.START_TIME
Browse files Browse the repository at this point in the history
  • Loading branch information
dveeden committed Aug 8, 2022
1 parent 5cf3680 commit 3810f2b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions infoschema/tables_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1592,3 +1592,11 @@ func TestTableConstraintsContainForeignKeys(t *testing.T) {
tk.MustQuery("SELECT * FROM INFORMATION_SCHEMA.table_constraints WHERE constraint_schema = 'tableconstraints' AND table_name = 't2'").Sort().Check(testkit.Rows("def tableconstraints PRIMARY tableconstraints t2 PRIMARY KEY", "def tableconstraints fk_t2_t1 tableconstraints t2 FOREIGN KEY"))
tk.MustQuery("SELECT * FROM INFORMATION_SCHEMA.table_constraints WHERE constraint_schema = 'tableconstraints' AND table_name = 't1'").Sort().Check(testkit.Rows("def tableconstraints PRIMARY tableconstraints t1 PRIMARY KEY"))
}

func TestClusterInfoTime(t *testing.T) {
store := testkit.CreateMockStore(t)
tk := testkit.NewTestKit(t, store)
tk.MustExec("SELECT START_TIME+1 FROM information_schema.CLUSTER_INFO")
warnings := tk.Session().GetSessionVars().StmtCtx.GetWarnings()
require.Lenf(t, warnings, 0, "expect no warnings, but found: %+v", warnings)
}

0 comments on commit 3810f2b

Please sign in to comment.