# HG changeset patch # User Matthew Wild # Date 1538419400 -3600 # Node ID db82b096b8429371eed71d452214faf8778a3531 # Parent b890ceb1c24f4f8dd1e24d2f53a0927711a00462 util.pubsub tests: Ensure necessary tests run in the defined order diff -r b890ceb1c24f -r db82b096b842 spec/util_pubsub_spec.lua --- a/spec/util_pubsub_spec.lua Mon Oct 08 15:33:15 2018 +0200 +++ b/spec/util_pubsub_spec.lua Mon Oct 01 19:43:20 2018 +0100 @@ -15,10 +15,13 @@ describe("util.pubsub", function () describe("simple node creation and deletion", function () + randomize(false); -- These tests are ordered + -- Roughly a port of scansion/scripts/pubsub_createdelete.scs local service = pubsub.new(); describe("#create", function () + randomize(false); -- These tests are ordered it("creates a new node", function () assert.truthy(service:create("princely_musings", true)); end); @@ -29,6 +32,7 @@ end); describe("#delete", function () + randomize(false); -- These tests are ordered it("deletes the node", function () assert.truthy(service:delete("princely_musings", true)); end); @@ -40,6 +44,8 @@ end); describe("simple publishing", function () + randomize(false); -- These tests are ordered + local notified; local broadcaster = spy.new(function (notif_type, node_name, subscribers, item) -- luacheck: ignore 212 notified = subscribers; @@ -82,6 +88,8 @@ end); describe("#issue1082", function () + randomize(false); -- These tests are ordered + local service = pubsub.new(); it("creates a node with max_items = 1", function ()