From b2e50c3bfae594ddaff39b6780a732b96259a4a4 Mon Sep 17 00:00:00 2001 From: Hanlei Qin Date: Tue, 10 Dec 2019 11:17:42 +0800 Subject: [PATCH] fixed --- test/testmongodb.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/testmongodb.lua b/test/testmongodb.lua index cda41ec4..c5175264 100644 --- a/test/testmongodb.lua +++ b/test/testmongodb.lua @@ -25,7 +25,7 @@ function test_auth() host = host, port = port, } ) - db = c[db_name] + local db = c[db_name] db:auth(username, password) db.testdb:dropIndex("*") @@ -86,8 +86,8 @@ function test_find_and_remove() assert(ret and ret.test_key2 == 1, err) local ret = db[db_name].testdb:find({test_key2 = {['$gt'] = 0}}):sort({test_key = 1}, {test_key2 = -1}):skip(1):limit(1) - assert(ret:count() == 3) - assert(ret:count(true) == 1) + assert(ret:count() == 3) + assert(ret:count(true) == 1) if ret:hasNext() then ret = ret:next() end