diff --git a/.denov b/.denov index 5dd5c3f4..283d4a01 100644 --- a/.denov +++ b/.denov @@ -1 +1 @@ -v0.36.0 \ No newline at end of file +v0.37.1 \ No newline at end of file diff --git a/modules-lock.json b/modules-lock.json index 6812d6b1..c863e652 100644 --- a/modules-lock.json +++ b/modules-lock.json @@ -1,6 +1,6 @@ { "https://deno.land/std": { - "version": "@v0.36.0", + "version": "@v0.37.1", "modules": [ "/util/async.ts", "/testing/asserts.ts", diff --git a/modules.json b/modules.json index 8431e243..97096ee4 100644 --- a/modules.json +++ b/modules.json @@ -1,6 +1,6 @@ { "https://deno.land/std": { - "version": "@v0.36.0", + "version": "@v0.37.1", "modules": [ "/util/async.ts", "/testing/asserts.ts", diff --git a/pipeline_test.ts b/pipeline_test.ts index b1523415..4c2deb61 100644 --- a/pipeline_test.ts +++ b/pipeline_test.ts @@ -1,7 +1,6 @@ import { assertEquals } from "./vendor/https/deno.land/std/testing/asserts.ts"; import { connect } from "./redis.ts"; -const { test } = Deno; - +const test = Deno.test; const addr = { hostname: "127.0.0.1", port: 6379 @@ -29,6 +28,7 @@ test(async function testPipeline() { ["integer", 1], ["integer", 1] ]); + redis.close(); }); test(async function testTx() { @@ -71,6 +71,7 @@ test(async function testTx() { parseInt(rep3[4][1] as string), parseInt(rep3[0][1] as string) + 3 ); + redis.close(); }); test("pipeline in concurrent", async () => { @@ -105,4 +106,5 @@ test("pipeline in concurrent", async () => { ["bulk", "c"] ] // flush() ]); + redis.close(); }); diff --git a/pubsub_test.ts b/pubsub_test.ts index 584abfd6..0da4cee5 100644 --- a/pubsub_test.ts +++ b/pubsub_test.ts @@ -1,6 +1,5 @@ import { assertEquals } from "./vendor/https/deno.land/std/testing/asserts.ts"; import { connect } from "./redis.ts"; -import { RedisPubSubMessage } from "./pubsub.ts"; const { test } = Deno; const addr = { hostname: "127.0.0.1", diff --git a/tests/connection_test.ts b/tests/connection_test.ts index c0ec3840..3a1786b8 100644 --- a/tests/connection_test.ts +++ b/tests/connection_test.ts @@ -14,9 +14,10 @@ test("ping", async () => { assertEquals(await client.ping("Deno"), "Deno"); }); test("quit", async () => { - const cli = await connect({ hostname: "127.0.0.1", port: 6379 }); - assertEquals(await cli.quit(), "OK"); - assertEquals(cli.isClosed, true); + const redis = await connect({ hostname: "127.0.0.1", port: 6379 }); + assertEquals(await redis.quit(), "OK"); + assertEquals(redis.isClosed, true); + redis.close(); }); test("select", async () => { assertEquals(await client.select(1), "OK"); diff --git a/tests/general_test.ts b/tests/general_test.ts index 1cb1e4ac..1a2cab15 100644 --- a/tests/general_test.ts +++ b/tests/general_test.ts @@ -5,16 +5,16 @@ import { } from "../vendor/https/deno.land/std/testing/asserts.ts"; import { makeTest } from "./test_util.ts"; -const { test, client, opts } = await makeTest("general"); +const { test, client: redis, opts } = await makeTest("general"); test("conccurent", async function testConcurrent() { let promises: Promise[] = []; for (const key of ["a", "b", "c"]) { - promises.push(client.set(key, key)); + promises.push(redis.set(key, key)); } await Promise.all(promises); promises = []; for (const key of ["a", "b", "c"]) { - promises.push(client.get(key)); + promises.push(redis.get(key)); } const [a, b, c] = await Promise.all(promises); assertEquals(a, "a"); @@ -24,23 +24,28 @@ test("conccurent", async function testConcurrent() { test("db0", async function testDb0Option() { const key = "exists"; - await client.set(key, "aaa"); - const exists1 = await client.exists(key); + const client1 = await connect({ ...opts, db: 0 }); + await client1.set(key, "aaa"); + const exists1 = await client1.exists(key); assertEquals(exists1, 1); const client2 = await connect({ ...opts, db: 0 }); const exists2 = await client2.exists(key); assertEquals(exists2, 1); + client1.close(); + client2.close(); }); test("exists", async function testDb1Option() { const key = "exists"; const client1 = await connect({ ...opts, db: 0 }); - await client.set(key, "aaa"); + await client1.set(key, "aaa"); const exists1 = await client1.exists(key); assertEquals(exists1, 1); const client2 = await connect({ ...opts, db: 1 }); const exists2 = await client2.exists(key); assertEquals(exists2, 0); + client1.close(); + client2.close(); }); [Infinity, NaN, "", "port"].forEach(v => { @@ -53,8 +58,8 @@ test("exists", async function testDb1Option() { test("execRawReply", async () => { assertEquals( - await client.executor.exec("SET", "key", "a"), + await redis.executor.exec("SET", "key", "a"), ["status", "OK"] ); - assertEquals(await client.executor.exec("GET", "key"), ["bulk", "a"]); + assertEquals(await redis.executor.exec("GET", "key"), ["bulk", "a"]); }); diff --git a/vendor/https/deno.land/std/fmt/colors.ts b/vendor/https/deno.land/std/fmt/colors.ts index 46ae3596..9c68c1ef 100644 --- a/vendor/https/deno.land/std/fmt/colors.ts +++ b/vendor/https/deno.land/std/fmt/colors.ts @@ -1 +1 @@ -export * from "https://deno.land/std@v0.36.0/fmt/colors.ts"; +export * from "https://deno.land/std@v0.37.1/fmt/colors.ts"; diff --git a/vendor/https/deno.land/std/io/bufio.ts b/vendor/https/deno.land/std/io/bufio.ts index 67f1f921..7625ebae 100644 --- a/vendor/https/deno.land/std/io/bufio.ts +++ b/vendor/https/deno.land/std/io/bufio.ts @@ -1 +1 @@ -export * from "https://deno.land/std@v0.36.0/io/bufio.ts"; +export * from "https://deno.land/std@v0.37.1/io/bufio.ts"; diff --git a/vendor/https/deno.land/std/testing/asserts.ts b/vendor/https/deno.land/std/testing/asserts.ts index f6d0ebea..002e7155 100644 --- a/vendor/https/deno.land/std/testing/asserts.ts +++ b/vendor/https/deno.land/std/testing/asserts.ts @@ -1 +1 @@ -export * from "https://deno.land/std@v0.36.0/testing/asserts.ts"; +export * from "https://deno.land/std@v0.37.1/testing/asserts.ts"; diff --git a/vendor/https/deno.land/std/util/async.ts b/vendor/https/deno.land/std/util/async.ts index 40c0deb6..950aa542 100644 --- a/vendor/https/deno.land/std/util/async.ts +++ b/vendor/https/deno.land/std/util/async.ts @@ -1 +1 @@ -export * from "https://deno.land/std@v0.36.0/util/async.ts"; +export * from "https://deno.land/std@v0.37.1/util/async.ts";