示例#1
0
    def tearDownClass(cls):
        # remove all keys used by this test case
        r = buildRange(cls.baseKey)
        if cls.client:
            xs = cls.client.getRange(r.startKey, r.endKey, r.startKeyInclusive, r.endKeyInclusive)
            for x in xs:
                cls.client.delete(x.key, x.metadata.version)
        else:
            print 'WARNING: no cls.client'

        if cls.simulator:
            if cls.simulator.poll() is None:
                cls.simulator.terminate()
            cls.simulator.wait()
        [f.close() for f in (cls.stdout, cls.stderr) if f]
        if cls.datadir:
            shutil.rmtree(cls.datadir)
示例#2
0
 def tearDown(self):
     r = buildRange(self.baseKey)
     xs = self.client.getRange(r.startKey, r.endKey, r.startKeyInclusive, r.endKeyInclusive)
     for x in xs:
         self.client.delete(x.key, x.metadata.version)