Skip to content
Browse files

added a test case for retrying flush-create scenario

Change-Id: Icc7db892c5dcacee68f2fd5423c9fb0720d9dd78
  • Loading branch information...
1 parent 1dc580e commit 2c63d726745606fc0117cd5391f889703b3fa98c @farshidce farshidce committed May 18, 2011
Showing with 32 additions and 0 deletions.
  1. +32 −0 pytests/temptest.py
View
32 pytests/temptest.py
@@ -0,0 +1,32 @@
+from TestInput import TestInputSingleton
+import logger
+
+import unittest
+from membase.api.rest_client import RestConnection
+from memcached.helper.data_helper import MemcachedClientHelper
+
+
+class TempTest(unittest.TestCase):
+ def setUp(self):
+ self._input = TestInputSingleton.input
+ self._servers = self._input.servers
+ self.log = logger.Logger().get_logger()
+
+ def test_create(self):
+ master = self._servers[0]
+ rest = RestConnection(master)
+ info = rest.get_nodes_self()
+ rest.init_cluster(username=master.rest_username,
+ password=master.rest_password)
+ rest.init_cluster_memoryQuota(memoryQuota=info.mcdMemoryReserved)
+ bucket_ram = info.mcdMemoryReserved * 2 / 3
+ rest.create_bucket(bucket='default',
+ ramQuotaMB=bucket_ram,
+ replicaNumber=1,
+ proxyPort=11211)
+
+ def test_flush(self):
+ try:
+ MemcachedClientHelper.flush_bucket(self._servers[0], 'default', 11211)
+ except Exception:
+ pass

0 comments on commit 2c63d72

Please sign in to comment.
Something went wrong with that request. Please try again.