1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-17 09:37:02 +00:00

extension: split out an async specific broker for "after" events (#346)

Signed-off-by: James Hillyerd <james@hillyerd.com>
This commit is contained in:
James Hillyerd
2023-02-16 16:17:06 -08:00
committed by GitHub
parent e1b8996412
commit 36095a2cdf
8 changed files with 205 additions and 71 deletions

View File

@@ -298,7 +298,7 @@ func testDelete(t *testing.T, store storage.Store, extHost *extension.Host) {
msgs := GetAndCountMessages(t, store, mailbox, len(subjects))
// Subscribe to events.
eventListener := extHost.Events.AfterMessageDeleted.AsyncTestListener(2)
eventListener := extHost.Events.AfterMessageDeleted.AsyncTestListener("test", 2)
// Delete a couple messages.
deleteIDs := []string{msgs[1].ID(), msgs[3].ID()}
@@ -345,7 +345,7 @@ func testPurge(t *testing.T, store storage.Store, extHost *extension.Host) {
subjects := []string{"alpha", "bravo", "charlie", "delta", "echo"}
// Subscribe to events.
eventListener := extHost.Events.AfterMessageDeleted.AsyncTestListener(len(subjects))
eventListener := extHost.Events.AfterMessageDeleted.AsyncTestListener("test", len(subjects))
// Populate mailbox.
for _, subj := range subjects {