Skip to content

Commit

Permalink
Release v0.18.1
Browse files Browse the repository at this point in the history
  • Loading branch information
slashdotdash committed Jun 13, 2019
1 parent bda3c19 commit f641e06
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 24 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## v0.18.1

### Enhancements

- Process manager idle process timeout ([#290](https://github.com/commanded/commanded/pull/290)).
- Register event handler and process manager subscriptions on process start ([#272](https://github.com/commanded/commanded/pull/272)).

## v0.18.0

### Enhancements
Expand Down Expand Up @@ -77,6 +84,18 @@
end
```

## v0.17.5

### Enhancements

- Process manager idle process timeout ([#290](https://github.com/commanded/commanded/pull/290)).

## v0.17.4

### Bug fixes

- Register event handler and process manager subscriptions on process start ([#272](https://github.com/commanded/commanded/pull/272)).

## v0.17.3

### Bug fixes
Expand Down
6 changes: 3 additions & 3 deletions mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Commanded.Mixfile do
use Mix.Project

@version "0.18.0"
@version "0.18.1"

def project do
[
Expand Down Expand Up @@ -53,9 +53,9 @@ defmodule Commanded.Mixfile do

# Build & test tools
{:dialyxir, "~> 0.5", only: :dev, runtime: false},
{:ex_doc, "~> 0.19", only: :dev},
{:ex_doc, "~> 0.20", only: :dev},
{:mix_test_watch, "~> 0.9", only: :dev},
{:mox, "~> 0.4", only: :test},
{:mox, "~> 0.5", only: :test},

# Optional dependencies
{:jason, "~> 1.1", optional: true},
Expand Down
10 changes: 5 additions & 5 deletions mix.lock
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
%{
"dialyxir": {:hex, :dialyxir, "0.5.1", "b331b091720fd93e878137add264bac4f644e1ddae07a70bf7062c7862c4b952", [:mix], [], "hexpm"},
"earmark": {:hex, :earmark, "1.3.1", "73812f447f7a42358d3ba79283cfa3075a7580a3a2ed457616d6517ac3738cb9", [:mix], [], "hexpm"},
"earmark": {:hex, :earmark, "1.3.2", "b840562ea3d67795ffbb5bd88940b1bed0ed9fa32834915125ea7d02e35888a5", [:mix], [], "hexpm"},
"elixir_uuid": {:hex, :elixir_uuid, "1.2.0", "ff26e938f95830b1db152cb6e594d711c10c02c6391236900ddd070a6b01271d", [:mix], [], "hexpm"},
"ex_doc": {:hex, :ex_doc, "0.19.3", "3c7b0f02851f5fc13b040e8e925051452e41248f685e40250d7e40b07b9f8c10", [:mix], [{:earmark, "~> 1.2", [hex: :earmark, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.10", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm"},
"file_system": {:hex, :file_system, "0.2.6", "fd4dc3af89b9ab1dc8ccbcc214a0e60c41f34be251d9307920748a14bf41f1d3", [:mix], [], "hexpm"},
"ex_doc": {:hex, :ex_doc, "0.20.2", "1bd0dfb0304bade58beb77f20f21ee3558cc3c753743ae0ddbb0fd7ba2912331", [:mix], [{:earmark, "~> 1.3", [hex: :earmark, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.10", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm"},
"file_system": {:hex, :file_system, "0.2.7", "e6f7f155970975789f26e77b8b8d8ab084c59844d8ecfaf58cbda31c494d14aa", [:mix], [], "hexpm"},
"jason": {:hex, :jason, "1.1.2", "b03dedea67a99223a2eaf9f1264ce37154564de899fd3d8b9a21b1a6fd64afe7", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm"},
"makeup": {:hex, :makeup, "0.8.0", "9cf32aea71c7fe0a4b2e9246c2c4978f9070257e5c9ce6d4a28ec450a839b55f", [:mix], [{:nimble_parsec, "~> 0.5.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm"},
"makeup_elixir": {:hex, :makeup_elixir, "0.13.0", "be7a477997dcac2e48a9d695ec730b2d22418292675c75aa2d34ba0909dcdeda", [:mix], [{:makeup, "~> 0.8", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm"},
"mix_test_watch": {:hex, :mix_test_watch, "0.9.0", "c72132a6071261893518fa08e121e911c9358713f62794a90c95db59042af375", [:mix], [{:file_system, "~> 0.2.1 or ~> 0.3", [hex: :file_system, repo: "hexpm", optional: false]}], "hexpm"},
"mox": {:hex, :mox, "0.4.0", "7f120840f7d626184a3d65de36189ca6f37d432e5d63acd80045198e4c5f7e6e", [:mix], [], "hexpm"},
"mox": {:hex, :mox, "0.5.1", "f86bb36026aac1e6f924a4b6d024b05e9adbed5c63e8daa069bd66fb3292165b", [:mix], [], "hexpm"},
"nimble_parsec": {:hex, :nimble_parsec, "0.5.0", "90e2eca3d0266e5c53f8fbe0079694740b9c91b6747f2b7e3c5d21966bba8300", [:mix], [], "hexpm"},
"phoenix_pubsub": {:hex, :phoenix_pubsub, "1.1.1", "6668d787e602981f24f17a5fbb69cc98f8ab085114ebfac6cc36e10a90c8e93c", [:mix], [], "hexpm"},
"phoenix_pubsub": {:hex, :phoenix_pubsub, "1.1.2", "496c303bdf1b2e98a9d26e89af5bba3ab487ba3a3735f74bf1f4064d2a845a3e", [:mix], [], "hexpm"},
}
35 changes: 19 additions & 16 deletions test/subscriptions/subscriptions_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -10,40 +10,43 @@ defmodule Commanded.SubscriptionsTest do
:ok = Subscriptions.register("handler2", :eventual)
:ok = Subscriptions.register("handler3", :strong)

assert Subscriptions.all() ==[{"handler3", self()}, {"handler1", self()}]
assert Subscriptions.all() == [{"handler3", self()}, {"handler1", self()}]
end

test "should not remove PID when process terminates" do
pid = spawn_link(fn ->
:ok = Subscriptions.register("handler1", :strong)
end)
pid =
spawn_link(fn ->
:ok = Subscriptions.register("handler1", :strong)
end)

ref = Process.monitor(pid)
assert_receive {:DOWN, ^ref, :process, _, :normal}
assert Subscriptions.all() ==[{"handler1", pid}]

assert Subscriptions.all() == [{"handler1", pid}]
end

test "should replace registered subscription PID" do
reply_to = self()

pid1 = spawn_link(fn ->
:ok = Subscriptions.register("handler1", :strong)
pid1 =
spawn_link(fn ->
:ok = Subscriptions.register("handler1", :strong)

send(reply_to,{:handler, self()})
end)
send(reply_to, {:handler, self()})
end)

assert_receive {:handler, ^pid1}
assert Subscriptions.all() ==[{"handler1", pid1}]
assert Subscriptions.all() == [{"handler1", pid1}]

pid2 = spawn_link(fn ->
:ok = Subscriptions.register("handler1", :strong)
pid2 =
spawn_link(fn ->
:ok = Subscriptions.register("handler1", :strong)

send(reply_to, {:handler, self()})
end)
send(reply_to, {:handler, self()})
end)

assert_receive {:handler, ^pid2}
assert Subscriptions.all() ==[{"handler1", pid2}]
assert Subscriptions.all() == [{"handler1", pid2}]
end

test "should ack event" do
Expand Down

0 comments on commit f641e06

Please sign in to comment.