diff options
author | Jay Doane <jay.s.doane@gmail.com> | 2018-12-12 20:41:27 -0800 |
---|---|---|
committer | Jay Doane <jay.s.doane@gmail.com> | 2018-12-27 13:07:57 -0800 |
commit | f29cdb49cac99f82c46aaadd69a6f70b8df4ed53 (patch) | |
tree | 063ddecbece8d0499a7e1db1c33ef6d8b4f32993 | |
parent | 4cc956552b8aaa31cec0e454051b19e4a8db5f77 (diff) | |
download | couchdb-f29cdb49cac99f82c46aaadd69a6f70b8df4ed53.tar.gz |
Suppress misc compiler warnings
- couch_util_tests.erl:90:
Warning: the result of the expression is ignored
- couch_mrview_index_changes_tests.erl:189,196:
Warning: a term is constructed, but never used
- couch_replicator_connection_tests.erl:76:
Warning: this expression will fail with a 'badarith' exception
-rw-r--r-- | src/couch/test/couch_util_tests.erl | 2 | ||||
-rw-r--r-- | src/couch_mrview/test/couch_mrview_index_changes_tests.erl | 4 | ||||
-rw-r--r-- | src/couch_replicator/test/couch_replicator_connection_tests.erl | 2 |
3 files changed, 3 insertions, 5 deletions
diff --git a/src/couch/test/couch_util_tests.erl b/src/couch/test/couch_util_tests.erl index a0e923872..3e145c4f6 100644 --- a/src/couch/test/couch_util_tests.erl +++ b/src/couch/test/couch_util_tests.erl @@ -87,7 +87,7 @@ flush_test() -> _IntsToAGazillion = lists:seq(1, 200000), _LotsOfData = lists:map(fun(_) -> <<"foobar">> end, lists:seq(1, 500000)), - _BigBin = list_to_binary(_LotsOfData), + _ = list_to_binary(_LotsOfData), %% Allocation 200K tuples puts us above the memory threshold %% Originally, there should be: diff --git a/src/couch_mrview/test/couch_mrview_index_changes_tests.erl b/src/couch_mrview/test/couch_mrview_index_changes_tests.erl index 2701e0c22..f0be1b9b1 100644 --- a/src/couch_mrview/test/couch_mrview_index_changes_tests.erl +++ b/src/couch_mrview/test/couch_mrview_index_changes_tests.erl @@ -186,15 +186,13 @@ test_stream(Db) -> test_indexer(Db) -> Result = run_query(Db, [{since, 14}, refresh]), Expect = {ok, 15, [{{15,14,<<"14">>},14}]}, - ?_assertEqual(Result, Expect), {ok, Db1} = save_doc(Db, 15), timer:sleep(1500), Result1 = run_query(Db1, [{since, 14}], false), Expect1 = {ok, 16, [{{15,14,<<"14">>},14}, {{16,15,<<"15">>},15}]}, - ?_assertEqual(Result1, Expect1), - ok. + ?_assert(Result == Expect andalso Result1 == Expect1). save_doc(Db, Id) -> diff --git a/src/couch_replicator/test/couch_replicator_connection_tests.erl b/src/couch_replicator/test/couch_replicator_connection_tests.erl index ef3f2b37e..e75cc5a63 100644 --- a/src/couch_replicator/test/couch_replicator_connection_tests.erl +++ b/src/couch_replicator/test/couch_replicator_connection_tests.erl @@ -73,7 +73,7 @@ connections_not_shared_after_owner_death({Host, Port}) -> Self = self(), spawn(fun() -> Self ! couch_replicator_connection:acquire(URL), - 1/0 + error("simulate division by zero without compiler warning") end), receive {ok, Pid} -> |