diff --git a/spec/02-integration/02-dao/02-migrations_spec.lua b/spec/02-integration/02-dao/02-migrations_spec.lua index 8a366f3519f..f059f19c2e1 100644 --- a/spec/02-integration/02-dao/02-migrations_spec.lua +++ b/spec/02-integration/02-dao/02-migrations_spec.lua @@ -10,6 +10,11 @@ helpers.for_each_dao(function(kong_config) local f = Factory(kong_config) f:drop_schema() end) + + teardown(function() + ngx.shared.cassandra:flush_expired() + end) + before_each(function() factory = Factory(kong_config) end) @@ -105,6 +110,7 @@ helpers.for_each_dao(function(kong_config) kong_config.pg_port = pg_port kong_config.cassandra_port = cassandra_port kong_config.cassandra_timeout = cassandra_timeout + ngx.shared.cassandra:flush_all() end) kong_config.pg_port = 3333 kong_config.cassandra_port = 3333 diff --git a/spec/02-integration/02-dao/03-crud_spec.lua b/spec/02-integration/02-dao/03-crud_spec.lua index 613aa27bfc0..d9a3b464e9e 100644 --- a/spec/02-integration/02-dao/03-crud_spec.lua +++ b/spec/02-integration/02-dao/03-crud_spec.lua @@ -45,6 +45,7 @@ helpers.for_each_dao(function(kong_config) end) teardown(function() factory:truncate_tables() + ngx.shared.cassandra:flush_expired() end) describe("insert()", function() @@ -701,6 +702,7 @@ helpers.for_each_dao(function(kong_config) kong_config.pg_port = pg_port kong_config.cassandra_port = cassandra_port kong_config.cassandra_timeout = cassandra_timeout + ngx.shared.cassandra:flush_all() end) kong_config.pg_port = 3333 kong_config.cassandra_port = 3333