couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxe...@apache.org
Subject [4/4] couchdb commit: updated refs/heads/master to 390e922
Date Sat, 15 Nov 2014 22:48:42 GMT
Handle couchjs restart command correctly


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/9ad3f9bd
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/9ad3f9bd
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/9ad3f9bd

Branch: refs/heads/master
Commit: 9ad3f9bdbbbe23fe56f888b6779863c7c7bb53db
Parents: 806979e
Author: Alexander Shorin <kxepal@apache.org>
Authored: Sat Nov 15 18:51:38 2014 +0300
Committer: Alexander Shorin <kxepal@apache.org>
Committed: Sun Nov 16 00:51:15 2014 +0300

----------------------------------------------------------------------
 dev/run             | 9 +++++++--
 test/javascript/run | 3 ++-
 2 files changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/9ad3f9bd/dev/run
----------------------------------------------------------------------
diff --git a/dev/run b/dev/run
index d25c7c6..3f98bf3 100755
--- a/dev/run
+++ b/dev/run
@@ -66,7 +66,7 @@ def main():
     ctx = setup()
     startup(ctx)
     if ctx['cmd']:
-        run_command(ctx['cmd'])
+        run_command(ctx, ctx['cmd'])
     else:
         join(ctx)
 
@@ -303,7 +303,7 @@ def join(ctx):
 
 
 @log('Exec command {cmd}')
-def run_command(cmd):
+def run_command(ctx, cmd):
     p = sp.Popen(cmd, shell=True, stdout=sp.PIPE, stderr=sys.stderr)
     while True:
         line = p.stdout.readline()
@@ -314,6 +314,11 @@ def run_command(cmd):
     exit(p.returncode)
 
 
+def reboot_nodes(ctx):
+    kill_processes(ctx)
+    boot_nodes(ctx)
+
+
 if __name__ == "__main__":
     try:
         main()

http://git-wip-us.apache.org/repos/asf/couchdb/blob/9ad3f9bd/test/javascript/run
----------------------------------------------------------------------
diff --git a/test/javascript/run b/test/javascript/run
index 2b6b382..ab145b1 100755
--- a/test/javascript/run
+++ b/test/javascript/run
@@ -82,8 +82,9 @@ def run_couchjs(test, fmt):
         line = p.stdout.readline()
         if not line:
             break
+        line = line.decode()
         if line.strip() == "restart":
-            sys.stdout.write("reboot_nodes()" + os.linesep)
+            sys.stdout.write("reboot_nodes(ctx)" + os.linesep)
             sys.stdout.flush()
         else:
             sys.stderr.write(line)


Mime
View raw message