Skip to content

Commit 954133d

Browse files
authored
Clarify why and how to start second session for tests (#14566)
1 parent 319360c commit 954133d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/elixir/pages/mix-and-otp/distributed-tasks.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ Distributed tasks are exactly the same as supervised tasks. The only difference
124124
Now, let's start two named nodes again, but inside the `:kv` application:
125125

126126
```console
127+
$ cd apps/kv
127128
$ iex --sname foo -S mix
128129
$ iex --sname bar -S mix
129130
```
@@ -231,9 +232,10 @@ The first test invokes `Kernel.node/0`, which returns the name of the current no
231232

232233
The second test checks that the code raises for unknown entries.
233234

234-
In order to run the first test, we need to have two nodes running. Move into `apps/kv` and let's restart the node named `bar` which is going to be used by tests.
235+
In order to run the first test, we need to have two nodes running. Let's move into `apps/kv` and restart the node named `bar` which is going to be used by tests. This way, `bar` will not load the `:kv_server` app and leave the port available for `foo` and tests.
235236

236237
```console
238+
$ cd apps/kv
237239
$ iex --sname bar -S mix
238240
```
239241

0 commit comments

Comments
 (0)