         
 
 
-module.exports.StressRedis = (test) ->
-
-    RUNS = 10000
+gentests "Stress", (test, backend) ->
+
+    RUNS = STRESS_RUNS
 
     run = () ->
-    back = new RedisBackend()
+    back = new backend()
     options =
         ttl:100 * 1000 # 100 secs should be enough
         key: () ->

{ Flexcache } = require("../flexcache")
{ RedisBackend } = require("../backend/redis")
{ MemoryBackend } = require("../backend/memory")

async = require 'async'
garbage = require 'garbage'

  return true;
}
`

gentests = (name, fnc) ->
    for backend in TEST_BACKENDS
        wrapper = (test) ->
            fnc(test, backend)
        dname = name + backend.name
        wrapper.name = dname
        module.exports[dname] = wrapper



gentests "TestConsistancy", (test, backend) ->

    console.log("test backend", backend.name)

    back = new backend() #RedisBackend()
    fc = new Flexcache back, ttl:400000, debug:2

    todo = 0 # calculated 
