summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Newson <rnewson@apache.org>2019-02-01 18:36:58 +0000
committerGitHub <noreply@github.com>2019-02-01 18:36:58 +0000
commit04a8f832fdaf31b31de15cc0500b3d47546da3a4 (patch)
tree6196b32a1ee1608509210725b7b328ca9d878456
parent4127726f26fc0e3d7423a058d4c1934a47a464a2 (diff)
parent82162b6fdf62c1cb283e9e88972a39ad617754cb (diff)
downloadcouchdb-04a8f832fdaf31b31de15cc0500b3d47546da3a4.tar.gz
Merge pull request #1889 from apache/import-cloudant-ioq
Import IOQ from Cloudant
-rw-r--r--Makefile13
-rw-r--r--rebar.config.script3
-rw-r--r--rel/reltool.config2
-rw-r--r--src/mango/src/mango_native_proc.erl17
4 files changed, 15 insertions, 20 deletions
diff --git a/Makefile b/Makefile
index ee44ea7f3..39476996c 100644
--- a/Makefile
+++ b/Makefile
@@ -76,7 +76,6 @@ COMPILE_OPTS=$(shell echo "\
apps=$(apps) \
" | sed -e 's/[a-z_]\{1,\}= / /g')
EUNIT_OPTS=$(shell echo "\
- apps=$(apps) \
skip_deps=$(skip_deps) \
suites=$(suites) \
tests=$(tests) \
@@ -154,13 +153,21 @@ check: all
.PHONY: eunit
# target: eunit - Run EUnit tests, use EUNIT_OPTS to provide custom options
+
+ifdef apps
+subdirs = $(apps)
+else
+subdirs=$(shell ls src)
+endif
+
eunit: export BUILDDIR = $(shell pwd)
eunit: export ERL_AFLAGS = -config $(shell pwd)/rel/files/eunit.config
eunit: export COUCHDB_QUERY_SERVER_JAVASCRIPT = $(shell pwd)/bin/couchjs $(shell pwd)/share/server/main.js
eunit: couch
@$(REBAR) setup_eunit 2> /dev/null
- @$(REBAR) -r eunit $(EUNIT_OPTS)
-
+ @for dir in $(subdirs); do \
+ $(REBAR) -r eunit $(EUNIT_OPTS) apps=$$dir; \
+ done
setup-eunit: export BUILDDIR = $(shell pwd)
setup-eunit: export ERL_AFLAGS = -config $(shell pwd)/rel/files/eunit.config
diff --git a/rebar.config.script b/rebar.config.script
index 571ce25e2..2a534e0dd 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -90,7 +90,8 @@ DepDescs = [
{ets_lru, "ets-lru", {tag, "1.0.0"}},
{khash, "khash", {tag, "1.0.1"}},
{snappy, "snappy", {tag, "CouchDB-1.0.2"}},
-{ioq, "ioq", {tag, "1.0.1"}},
+{ioq, "ioq", {tag, "2.0.0"}},
+{hqueue, "hqueue", {tag, "1.0.0"}},
%% Non-Erlang deps
{docs, {url, "https://github.com/apache/couchdb-documentation"},
diff --git a/rel/reltool.config b/rel/reltool.config
index 858e935b2..ba1afc271 100644
--- a/rel/reltool.config
+++ b/rel/reltool.config
@@ -46,6 +46,7 @@
fabric,
folsom,
global_changes,
+ hqueue,
hyper,
ibrowse,
ioq,
@@ -100,6 +101,7 @@
{app, fabric, [{incl_cond, include}]},
{app, folsom, [{incl_cond, include}]},
{app, global_changes, [{incl_cond, include}]},
+ {app, hqueue, [{incl_cond, include}]},
{app, hyper, [{incl_cond, include}]},
{app, ibrowse, [{incl_cond, include}]},
{app, ioq, [{incl_cond, include}]},
diff --git a/src/mango/src/mango_native_proc.erl b/src/mango/src/mango_native_proc.erl
index 4c536f871..ab161469a 100644
--- a/src/mango/src/mango_native_proc.erl
+++ b/src/mango/src/mango_native_proc.erl
@@ -367,22 +367,7 @@ validate_index_info(IndexInfo) ->
-include_lib("eunit/include/eunit.hrl").
handle_garbage_collect_cast_test() ->
- Pid = self(),
- {_, TracerRef} = spawn_monitor(fun() ->
- erlang:trace(Pid, true, [garbage_collection]),
- receive {trace, Pid, gc_start, _} ->
- erlang:trace(Pid, false, [garbage_collection]),
- exit(gc_start)
- end
- end),
- erlang:yield(),
- ?assertEqual({noreply, []}, handle_cast(garbage_collect, [])),
- receive
- {'DOWN', TracerRef, _, _, Msg} -> ?assertEqual(gc_start, Msg)
- after 1000 ->
- erlang:error({assertion_failed, [{module, ?MODULE}, {line, ?LINE},
- {expected, gc_start}, {reason, timeout}]})
- end.
+ ?assertEqual({noreply, []}, handle_cast(garbage_collect, [])).
handle_stop_cast_test() ->
?assertEqual({stop, normal, []}, handle_cast(stop, [])).