diff --git a/tests/system-test/0-others/fsync.py b/tests/system-test/0-others/fsync.py index 8ee724175b8d87bc3a00ef3787301dc3c92000a9..aab8cccb3bd70505626514e103c955967e175a5a 100644 --- a/tests/system-test/0-others/fsync.py +++ b/tests/system-test/0-others/fsync.py @@ -50,31 +50,35 @@ class TDTestCase: tdSql.execute("drop database if exists db1") tdSql.execute("create database db1 wal 1") - tdSql.query("show datsbases") + tdSql.query("show databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, wal_index, 1) tdSql.execute("drop database if exists db1") tdSql.execute("create database db1 wal 2") + tdSql.query("show databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, wal_index, 2) tdSql.execute("drop database if exists db1") tdSql.execute("create database db1 fsync 0") + tdSql.query("show databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, fsync_index, 0) tdSql.execute("drop database if exists db1") tdSql.execute("create database db1 fsync 3000") + tdSql.query("show databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, fsync_index, 3000) tdSql.execute("drop database if exists db1") tdSql.execute("create database db1 fsync 180000") + tdSql.query("show databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, fsync_index, 180000) @@ -82,6 +86,7 @@ class TDTestCase: tdSql.execute("drop database if exists db1") tdSql.execute("create database db1 wal 1 fsync 3000") + tdSql.query("show databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, fsync_index, 180000) @@ -89,42 +94,49 @@ class TDTestCase: tdSql.execute("drop database if exists db1") tdSql.execute("create database db1 wal 2 fsync 3000") + tdSql.query("show databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, fsync_index, 3000) tdSql.checkData(i, wal_index, 2) tdSql.execute("alter database db1 wal 1") + tdSql.query("show databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, fsync_index, 3000) tdSql.checkData(i, wal_index, 1) tdSql.execute("alter database db1 wal 2") + tdSql.query("show databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, fsync_index, 3000) tdSql.checkData(i, wal_index, 2) tdSql.execute("alter database db1 fsync 0") + tdSql.query("show databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, fsync_index, 0) tdSql.checkData(i, wal_index, 2) tdSql.execute("alter database db1 fsync 3000") + tdSql.query("show databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, fsync_index, 3000) tdSql.checkData(i, wal_index, 2) tdSql.execute("alter database db1 fsync 18000") + tdSql.query("show databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, fsync_index, 18000) tdSql.checkData(i, wal_index, 2) tdSql.execute("alter database db1 wal 1 fsync 3000") + tdSql.query("show databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, fsync_index, 3000)