Skip to content

Commit

Permalink
Ninja-unify 1.1/1.2/2.0 system tests
Browse files Browse the repository at this point in the history
  • Loading branch information
iamaleksey committed May 5, 2013
1 parent ac1d7ee commit 81e19fc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/cassandra.in.sh
Expand Up @@ -39,7 +39,7 @@ JVM_OPTS=" \
-Xrunjdwp:transport=dt_socket,server=y,address=8898,suspend=n \
-Xms128M \
-Xmx1G \
-Xss128k \
-Xss180k \
-XX:SurvivorRatio=8 \
-XX:TargetSurvivorRatio=90 \
-XX:+AggressiveOpts \
Expand Down
8 changes: 5 additions & 3 deletions test/system/__init__.py
Expand Up @@ -65,14 +65,14 @@ def setUp(self):
if os.path.exists(pid_fname):
pid_path = os.path.join(root, pid_fname)
print "Unclean shutdown detected, (%s found)" % pid_path
sys.exit()
raise Exception('damn it')

# clean out old stuff
import shutil
# todo get directories from conf/cassandra.yaml
for dirname in ['system', 'data', 'commitlog']:
try:
shutil.rmtree('build/test/cassandra/' + dirname)
shutil.rmtree(os.path.join(root, 'build', 'test', 'cassandra', dirname))
except OSError:
pass
# start the server
Expand Down Expand Up @@ -103,7 +103,7 @@ def setUp(self):
stdout_value, stderr_value = process.communicate()
print "Stdout: %s" % (stdout_value)
print "Stderr: %s" % (stderr_value)
sys.exit()
raise Exception('damn it')
else:
try:
self.open_client()
Expand Down Expand Up @@ -132,6 +132,8 @@ def is_alive(pid):
if not is_alive(spid):
break
slept += 0.5
# Give time for cassandra to shutdown
time.sleep(2)
if (slept > max_wait and is_alive(spid)):
os.kill(spid, signal.SIGKILL)
fpath = os.path.join(root, pid_fname)
Expand Down

0 comments on commit 81e19fc

Please sign in to comment.