def test_gcwithkeylist(self):
    # timeout very fast
#    self.zk.stopGC()
    zkappscale.zktransaction.TX_TIMEOUT = 1
    zkappscale.zktransaction.GC_INTERVAL = 1
#    self.zk.setRollbackFunction(self.__rollbackReceiver)
    # restart gc thread
    self.keylist = None
    self.zk.startGC()

    app = "testapp"
    key = "gctestkey"
    txid = self.zk.get_transaction_id(app)
    self.assertTrue(0 > txid)
    ret = self.zk.acquire_lock(app, txid, key)
    self.assertTrue(ret)
    vid = 100L
    self.zk.register_updated_key(app, txid, vid, key + "/a")
    # wait for gc
    time.sleep(5)
    self.assertTrue(self.zk.is_blacklisted(app, txid))
    try:
      self.zk.release_lock(app, txid, key)
      self.fail()
    except zkappscale.zktransaction.ZKTransactionException as e:
      print e
      self.assertEqual(zkappscale.zktransaction.ZKTransactionException.TYPE_EXPIRED, e.getType())
    try:
      self.zk.acquire_lock(app, txid, key)
      self.fail()
    except zkappscale.zktransaction.ZKTransactionException as e:
      print e
      self.assertEqual(zkappscale.zktransaction.ZKTransactionException.TYPE_EXPIRED, e.getType())

#    self.assertEqual(app, self.app_id)
#    self.assertEqual(txid, self.txid)
#    self.assertEqual(key, self.rootkey)
#    self.assertTrue(self.keylist.index("a") >= 0)
#    self.assertTrue(self.keylist.index("b") >= 0)

    # revert settings
#    self.zk.stopGC()
    zkappscale.zktransaction.TX_TIMEOUT = 30
    zkappscale.zktransaction.GC_INTERVAL = 30
#    self.zk.setRollbackFunction(None)
    self.zk.startGC()
dataset/ETHPy150Open AppScale/appscale/AppDB/test/functional/test_zktransaction.py/TestZKTransaction.test_gcwithkeylist/swapped operands of `>`