       ]
     }
 
-  # Top N Cache Test
-  describe "split page; apply deleted, count; combine descending", ->
-    it "should have the same results for different drivers", testEquality {
-      drivers: ['mySqlCached', 'mySql']
-      query: [
+  describe 'topN Cache', ->
+    setUpQuery = [
         { operation: 'filter', type:'within', attribute:'time', range: [ new Date(Date.UTC(2013, 2-1, 26, 0, 0, 0)), new Date(Date.UTC(2013, 2-1, 27, 0, 0, 0))] }
         { operation: 'split', name: 'Page', bucket: 'identity', attribute: 'namespace' }
         { operation: 'apply', name: 'Count', aggregate: 'sum', attribute: 'count' }
         { operation: 'apply', name: 'Deleted', aggregate: 'sum', attribute: 'deleted' }
         { operation: 'combine', combine: 'slice', sort: { compare: 'natural', prop: 'Deleted', direction: 'descending' }, limit: 5 }
       ]
-    }
-
-  describe "[cache tests on] topN", ->
-    before -> allowQuery = false
+
+    before (done) ->
+      driverFns.mySqlCached(setUpQuery, (err, result) ->
+        throw err if err?
+        allowQuery = false
+        done()
+        return
+      )
+
     after -> allowQuery = true
 
     describe "split page; apply deleted; combine descending", ->

        { operation: 'apply', name: 'Added', aggregate: 'sum', attribute: 'added' }
        { operation: 'combine', combine: 'slice', sort: { compare: 'natural', prop: 'Time', direction: 'ascending' } }
      ]
    }

  describe "[cache tests on] filter; split time; apply count", ->
    before -> allowQuery = false
    after -> allowQuery = true

    describe "filter; split time; apply count; apply added", ->

    after -> allowQuery = true

    describe "filter; split time; apply count; apply added; combine time descending", ->
      testQuery = [
        { operation: 'filter', type: 'and', filters: [
          { operation: 'filter', attribute: 'language', type: 'is', value: 'en' }
          { operation: 'filter', type:'within', attribute:'time', range: [ new Date(Date.UTC(2013, 2-1, 26, 0, 0, 0)), new Date(Date.UTC(2013, 2-1, 27, 0, 0, 0))] }
        ]}
        { operation: 'apply', name: 'Count', aggregate: 'sum', attribute: 'count' }
        { operation: 'apply', name: 'Added', aggregate: 'sum', attribute: 'added' }
      ]

      it "should have the same results for different drivers", testEquality {
        drivers: ['mySqlCached', 'mySql']
        query: testQuery
