You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2011/04/23 02:59:26 UTC

svn commit: r1096099 - in /couchdb/branches/1.1.x: ./ etc/default/ src/couchdb/ test/etap/

Author: davisp
Date: Sat Apr 23 00:59:25 2011
New Revision: 1096099

URL: http://svn.apache.org/viewvc?rev=1096099&view=rev
Log:
Fix random errors in 173-os-daemon-cfg-register.t

This is a backport of 1096098 from trunk.


Added:
    couchdb/branches/1.1.x/test/etap/test_cfg_register.c
      - copied unchanged from r1096098, couchdb/trunk/test/etap/test_cfg_register.c
Removed:
    couchdb/branches/1.1.x/test/etap/173-os-daemon-cfg-register.es
Modified:
    couchdb/branches/1.1.x/   (props changed)
    couchdb/branches/1.1.x/.gitignore
    couchdb/branches/1.1.x/etc/default/couchdb   (props changed)
    couchdb/branches/1.1.x/license.skip
    couchdb/branches/1.1.x/src/couchdb/couch_os_daemons.erl
    couchdb/branches/1.1.x/test/etap/   (props changed)
    couchdb/branches/1.1.x/test/etap/173-os-daemon-cfg-register.t
    couchdb/branches/1.1.x/test/etap/Makefile.am

Propchange: couchdb/branches/1.1.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Apr 23 00:59:25 2011
@@ -6,4 +6,4 @@
 /couchdb/branches/list-iterator:782292-784593
 /couchdb/branches/tail_header:775760-778477
 /couchdb/tags/0.10.0:825400
-/couchdb/trunk:1045203,1064417,1081107-1083320,1095523,1095557,1095569,1095581
+/couchdb/trunk:1045203,1064417,1081107-1083320,1095523,1095557,1095569,1095581,1096098

Modified: couchdb/branches/1.1.x/.gitignore
URL: http://svn.apache.org/viewvc/couchdb/branches/1.1.x/.gitignore?rev=1096099&r1=1096098&r2=1096099&view=diff
==============================================================================
--- couchdb/branches/1.1.x/.gitignore (original)
+++ couchdb/branches/1.1.x/.gitignore Sat Apr 23 00:59:25 2011
@@ -65,7 +65,9 @@ src/erlang-oauth/oauth.app
 src/ibrowse/ibrowse.app
 src/mochiweb/mochiweb.app
 test/local.ini
+test/etap/.deps/
 test/etap/run
+test/etap/test_cfg_register
 test/etap/test_util.erl
 test/javascript/run
 share/server/main.js

Propchange: couchdb/branches/1.1.x/etc/default/couchdb
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Apr 23 00:59:25 2011
@@ -6,5 +6,5 @@
 /couchdb/branches/list-iterator/etc/default/couchdb:782292-784593
 /couchdb/branches/tail_header/etc/default/couchdb:775760-778477
 /couchdb/tags/0.10.0/etc/default/couchdb:825400
-/couchdb/trunk/etc/default/couchdb:1045203,1064417,1081107-1083320,1095523,1095557,1095569,1095581
+/couchdb/trunk/etc/default/couchdb:1045203,1064417,1081107-1083320,1095523,1095557,1095569,1095581,1096098
 /incubator/couchdb/trunk/etc/default/couchdb:642419-694440

Modified: couchdb/branches/1.1.x/license.skip
URL: http://svn.apache.org/viewvc/couchdb/branches/1.1.x/license.skip?rev=1096099&r1=1096098&r2=1096099&view=diff
==============================================================================
--- couchdb/branches/1.1.x/license.skip (original)
+++ couchdb/branches/1.1.x/license.skip Sat Apr 23 00:59:25 2011
@@ -93,6 +93,9 @@
 ^test/bench/Makefile
 ^test/bench/Makefile.in
 ^test/etap/.*beam
+^test/etap/.*\.o
+^test/etap/.deps/*
+^test/etap/test_cfg_register
 ^test/etap/Makefile
 ^test/etap/Makefile.in
 ^test/etap/temp.*

Modified: couchdb/branches/1.1.x/src/couchdb/couch_os_daemons.erl
URL: http://svn.apache.org/viewvc/couchdb/branches/1.1.x/src/couchdb/couch_os_daemons.erl?rev=1096099&r1=1096098&r2=1096099&view=diff
==============================================================================
--- couchdb/branches/1.1.x/src/couchdb/couch_os_daemons.erl (original)
+++ couchdb/branches/1.1.x/src/couchdb/couch_os_daemons.erl Sat Apr 23 00:59:25 2011
@@ -86,12 +86,12 @@ handle_info({'EXIT', Port, Reason}, Tabl
             ?LOG_INFO("Port ~p exited after stopping: ~p~n", [Port, Reason]);
         [#daemon{status=stopping}] ->
             true = ets:delete(Table, Port);
-        [#daemon{name=Name, status=restarting, errors=Errs}=D] ->
+        [#daemon{name=Name, status=restarting}=D] ->
             ?LOG_INFO("Daemon ~P restarting after config change.", [Name]),
             true = ets:delete(Table, Port),
             {ok, Port2} = start_port(D#daemon.cmd),
             true = ets:insert(Table, D#daemon{
-                port=Port2, status=running, kill=undefined, errors=Errs, buf=[]
+                port=Port2, status=running, kill=undefined, buf=[]
             });
         [#daemon{name=Name, status=halted}] ->
             ?LOG_ERROR("Halted daemon process: ~p", [Name]);
@@ -106,12 +106,12 @@ handle_info({Port, {exit_status, Status}
         [] ->
             ?LOG_ERROR("Unknown port ~p exiting ~p", [Port, Status]),
             {stop, {error, unknown_port_died, Status}, Table};
-        [#daemon{name=Name, status=restarting, errors=Errors}=D] ->
+        [#daemon{name=Name, status=restarting}=D] ->
             ?LOG_INFO("Daemon ~P restarting after config change.", [Name]),
             true = ets:delete(Table, Port),
             {ok, Port2} = start_port(D#daemon.cmd),
             true = ets:insert(Table, D#daemon{
-                port=Port2, kill=undefined, errors=Errors, buf=[]
+                port=Port2, status=running, kill=undefined, buf=[]
             }),
             {noreply, Table};
         [#daemon{status=stopping}=D] ->
@@ -140,7 +140,8 @@ handle_info({Port, {exit_status, Status}
                     true = ets:delete(Table, Port),
                     {ok, Port2} = start_port(D#daemon.cmd),
                     true = ets:insert(Table, D#daemon{
-                        port=Port2, kill=undefined, errors=Errors, buf=[]
+                        port=Port2, status=running, kill=undefined,
+                                                errors=Errors, buf=[]
                     }),
                     {noreply, Table}
             end;

Propchange: couchdb/branches/1.1.x/test/etap/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sat Apr 23 00:59:25 2011
@@ -1,3 +1,4 @@
+.deps
 temp.*
 Makefile
 Makefile.in

Modified: couchdb/branches/1.1.x/test/etap/173-os-daemon-cfg-register.t
URL: http://svn.apache.org/viewvc/couchdb/branches/1.1.x/test/etap/173-os-daemon-cfg-register.t?rev=1096099&r1=1096098&r2=1096099&view=diff
==============================================================================
--- couchdb/branches/1.1.x/test/etap/173-os-daemon-cfg-register.t (original)
+++ couchdb/branches/1.1.x/test/etap/173-os-daemon-cfg-register.t Sat Apr 23 00:59:25 2011
@@ -28,7 +28,7 @@ daemon_name() ->
     "wheee".
 
 daemon_cmd() ->
-    test_util:source_file("test/etap/173-os-daemon-cfg-register.es").
+    test_util:build_file("test/etap/test_cfg_register").
 
 main(_) ->
     test_util:init_code_path(),

Modified: couchdb/branches/1.1.x/test/etap/Makefile.am
URL: http://svn.apache.org/viewvc/couchdb/branches/1.1.x/test/etap/Makefile.am?rev=1096099&r1=1096098&r2=1096099&view=diff
==============================================================================
--- couchdb/branches/1.1.x/test/etap/Makefile.am (original)
+++ couchdb/branches/1.1.x/test/etap/Makefile.am Sat Apr 23 00:59:25 2011
@@ -13,6 +13,10 @@
 noinst_SCRIPTS = run
 noinst_DATA = test_util.beam test_web.beam
 
+noinst_PROGRAMS = test_cfg_register
+test_cfg_register_SOURCES = test_cfg_register.c
+test_cfg_register_CFLAGS = -D_BSD_SOURCE
+
 %.beam: %.erl
 	$(ERLC) $<
 
@@ -78,7 +82,7 @@ EXTRA_DIST = \
     172-os-daemon-errors.3.es \
     172-os-daemon-errors.4.es \
     172-os-daemon-errors.t \
-	173-os-daemon-cfg-register.es \
 	173-os-daemon-cfg-register.t \
 	180-http-proxy.ini \
-	180-http-proxy.t
+	180-http-proxy.t \
+    190-json-stream-parse.t