This is an automated email from the ASF dual-hosted git repository.

wohali pushed a commit to branch 1732-mango-tests-windows
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit ba1c6efa20f9ddb6f111acc50e1be36d28e3c617
Author: Joan Touzet <[email protected]>
AuthorDate: Tue Nov 13 16:44:47 2018 -0500

    [Win] elixir fix: use 127.0.0.1, not localhost
    
    "It's the test suite, it can't be DNS!"
    
    "It's ALWAYS DNS."
---
 test/elixir/lib/couch.ex              |  2 +-
 test/elixir/mix.exs                   |  2 +-
 test/elixir/mix.lock                  |  6 +++---
 test/elixir/run                       |  2 ++
 test/elixir/run.cmd                   |  2 ++
 test/elixir/test/replication_test.exs | 14 +++++++-------
 6 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/test/elixir/lib/couch.ex b/test/elixir/lib/couch.ex
index 6ae702e..3d38cfe 100644
--- a/test/elixir/lib/couch.ex
+++ b/test/elixir/lib/couch.ex
@@ -47,7 +47,7 @@ defmodule Couch do
   """
 
   def process_url(url) do
-    "http://localhost:15984"; <> url
+    "http://127.0.0.1:15984"; <> url
   end
 
   def process_request_headers(headers, options) do
diff --git a/test/elixir/mix.exs b/test/elixir/mix.exs
index 9b0f642..f6a4938 100644
--- a/test/elixir/mix.exs
+++ b/test/elixir/mix.exs
@@ -23,7 +23,7 @@ defmodule Foo.Mixfile do
     [
       # {:dep_from_hexpm, "~> 0.3.0"},
       {:httpotion, "~> 3.0"},
-      {:jiffy, "~> 0.14.11"}
+      {:jiffy, "~> 0.15.2"}
       # {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git";, tag: 
"0.1.0"},
     ]
   end
diff --git a/test/elixir/mix.lock b/test/elixir/mix.lock
index 4a2e760..abbea1d 100644
--- a/test/elixir/mix.lock
+++ b/test/elixir/mix.lock
@@ -1,5 +1,5 @@
 %{
-  "httpotion": {:hex, :httpotion, "3.0.3", 
"17096ea1a7c0b2df74509e9c15a82b670d66fc4d66e6ef584189f63a9759428d", [:mix], 
[{:ibrowse, "~> 4.4", [hex: :ibrowse, repo: "hexpm", optional: false]}], 
"hexpm"},
-  "ibrowse": {:hex, :ibrowse, "4.4.0", 
"2d923325efe0d2cb09b9c6a047b2835a5eda69d8a47ed6ff8bc03628b764e991", [:rebar3], 
[], "hexpm"},
-  "jiffy": {:hex, :jiffy, "0.14.11", 
"919a87d491c5a6b5e3bbc27fafedc3a0761ca0b4c405394f121f582fd4e3f0e5", [:rebar3], 
[], "hexpm"},
+  "httpotion": {:hex, :httpotion, "3.1.0", 
"14d20d9b0ce4e86e253eb91e4af79e469ad949f57a5d23c0a51b2f86559f6589", [:mix], 
[{:ibrowse, "~> 4.4", [hex: :ibrowse, repo: "hexpm", optional: false]}], 
"hexpm"},
+  "ibrowse": {:hex, :ibrowse, "4.4.1", 
"2b7d0637b0f8b9b4182de4bd0f2e826a4da2c9b04898b6e15659ba921a8d6ec2", [:rebar3], 
[], "hexpm"},
+  "jiffy": {:hex, :jiffy, "0.15.2", 
"de266c390111fd4ea28b9302f0bc3d7472468f3b8e0aceabfbefa26d08cd73b7", [:rebar3], 
[], "hexpm"},
 }
diff --git a/test/elixir/run b/test/elixir/run
index 66a5947..2d8464c 100755
--- a/test/elixir/run
+++ b/test/elixir/run
@@ -1,4 +1,6 @@
 #!/bin/bash -e
 cd "$(dirname "$0")"
+mix local.hex --force
+mix local.rebar --force
 mix deps.get
 mix test --trace
diff --git a/test/elixir/run.cmd b/test/elixir/run.cmd
index 4c64996..a99df8c 100644
--- a/test/elixir/run.cmd
+++ b/test/elixir/run.cmd
@@ -1,5 +1,7 @@
 @ECHO OFF
 
 cd %~dp0
+call mix local.hex --force
+call mix local.rebar --force
 call mix deps.get
 call mix test --trace
diff --git a/test/elixir/test/replication_test.exs 
b/test/elixir/test/replication_test.exs
index 8c376d7..4442688 100644
--- a/test/elixir/test/replication_test.exs
+++ b/test/elixir/test/replication_test.exs
@@ -10,9 +10,9 @@ defmodule ReplicationTest do
   @admin_account "adm:pass"
   @db_pairs_prefixes [
     {"local-to-local", "", ""},
-    {"remote-to-local", "http://localhost:15984/";, ""},
-    {"local-to-remote", "", "http://localhost:15984/"},
-    {"remote-to-remote", "http://localhost:15984/";, "http://localhost:15984/"}
+    {"remote-to-local", "http://127.0.0.1:15984/";, ""},
+    {"local-to-remote", "", "http://127.0.0.1:15984/"},
+    {"remote-to-remote", "http://127.0.0.1:15984/";, "http://127.0.0.1:15984/"}
   ]
 
   # This should probably go into `make elixir` like what
@@ -31,7 +31,7 @@ defmodule ReplicationTest do
 
   test "source database not found with host" do
     name = random_db_name()
-    url = "http://localhost:15984/"; <> name <> "_src"
+    url = "http://127.0.0.1:15984/"; <> name <> "_src"
     check_not_found(url, name <> "_tgt")
   end
 
@@ -53,7 +53,7 @@ defmodule ReplicationTest do
     doc = %{"_id" => "doc1"}
     [doc] = save_docs(src_db_name, [doc])
 
-    result = replicate(src_db_name, "http://localhost:15984/"; <> tgt_db_name)
+    result = replicate(src_db_name, "http://127.0.0.1:15984/"; <> tgt_db_name)
     assert result["ok"]
     assert is_list(result["history"])
     history = Enum.at(result["history"], 0)
@@ -73,7 +73,7 @@ defmodule ReplicationTest do
     })
     [doc] = save_docs(src_db_name, [doc])
 
-    result = replicate(src_db_name, "http://localhost:15984/"; <> tgt_db_name)
+    result = replicate(src_db_name, "http://127.0.0.1:15984/"; <> tgt_db_name)
 
     assert result["ok"]
     assert is_list(result["history"])
@@ -157,7 +157,7 @@ defmodule ReplicationTest do
 
     save_docs(src_db_name, make_docs(1..6))
 
-    repl_src = "http://localhost:15984/"; <> src_db_name
+    repl_src = "http://127.0.0.1:15984/"; <> src_db_name
     repl_body = %{"continuous" => true}
     result = replicate(repl_src, tgt_db_name, body: repl_body)
 

Reply via email to