diff options
| author | EuAndreh <eu@euandre.org> | 2025-05-03 19:50:33 -0300 |
|---|---|---|
| committer | EuAndreh <eu@euandre.org> | 2025-05-03 19:50:33 -0300 |
| commit | 7bf98f14cf2fa74c3591ce7b2b32c4e3c9263c3b (patch) | |
| tree | 494f86b809ec0d6d69148c7422ea2930c4d437e5 /tests/functional | |
| parent | src/fiinha.go: os.Exit(rc) instead of ignoring rc (diff) | |
| download | fiinha-7bf98f14cf2fa74c3591ce7b2b32c4e3c9263c3b.tar.gz fiinha-7bf98f14cf2fa74c3591ce7b2b32c4e3c9263c3b.tar.xz | |
re s/guuid/uuid/g
Diffstat (limited to 'tests/functional')
| -rw-r--r-- | tests/functional/consumer-with-deadletter/fiinha.go | 14 | ||||
| -rw-r--r-- | tests/functional/new-instance-takeover/fiinha.go | 22 | ||||
| -rw-r--r-- | tests/functional/wait-after-publish/fiinha.go | 8 |
3 files changed, 22 insertions, 22 deletions
diff --git a/tests/functional/consumer-with-deadletter/fiinha.go b/tests/functional/consumer-with-deadletter/fiinha.go index 7d88e0e..37893e1 100644 --- a/tests/functional/consumer-with-deadletter/fiinha.go +++ b/tests/functional/consumer-with-deadletter/fiinha.go @@ -4,7 +4,7 @@ import ( "errors" "runtime" - "guuid" + "uuid" g "gobang" ) @@ -47,7 +47,7 @@ func MainTest() { g.TErrorIf(err) defer queue.Close() - pub := func(payload []byte, flowID guuid.UUID) { + pub := func(payload []byte, flowID uuid.UUID) { unsent := UnsentMessage{ Topic: topicX, FlowID: flowID, @@ -59,7 +59,7 @@ func MainTest() { g.Testing("we can WaitFor() a message after a deadletter", func() { - flowID := guuid.New() + flowID := uuid.New() handlerFn := func(message Message) error { messageY, err := processNewEventXToY(message) @@ -73,10 +73,10 @@ func MainTest() { queue.Subscribe(topicX, "main-worker", handlerFn) defer queue.Unsubscribe(topicX, "main-worker") - pub([]byte("event 1"), guuid.New()) - pub([]byte("event 2"), guuid.New()) - pub([]byte("event 3"), guuid.New()) - pub([]byte("event 4"), guuid.New()) + pub([]byte("event 1"), uuid.New()) + pub([]byte("event 2"), uuid.New()) + pub([]byte("event 3"), uuid.New()) + pub([]byte("event 4"), uuid.New()) pub([]byte("event 5"), flowID) given := <- queue.WaitFor(topicY, flowID, "waiter").Channel diff --git a/tests/functional/new-instance-takeover/fiinha.go b/tests/functional/new-instance-takeover/fiinha.go index 5fdb9b4..5e6ad4b 100644 --- a/tests/functional/new-instance-takeover/fiinha.go +++ b/tests/functional/new-instance-takeover/fiinha.go @@ -4,7 +4,7 @@ import ( "runtime" "os" - "guuid" + "uuid" g "gobang" ) @@ -14,7 +14,7 @@ const topic = "topic" -func pub(queue IQueue, topic string, flowID guuid.UUID) { +func pub(queue IQueue, topic string, flowID uuid.UUID) { unsent := UnsentMessage{ Topic: topic, FlowID: flowID, @@ -24,7 +24,7 @@ func pub(queue IQueue, topic string, flowID guuid.UUID) { g.TErrorIf(err) } -func handlerFn(publish func(guuid.UUID)) func(Message) error { +func handlerFn(publish func(uuid.UUID)) func(Message) error { return func(message Message) error { publish(message.FlowID) return nil @@ -49,8 +49,8 @@ func startInstance( queue.queries = queries - pub_ := func(topic string) func(guuid.UUID) { - return func(flowID guuid.UUID) { + pub_ := func(topic string) func(uuid.UUID) { + return func(flowID uuid.UUID) { pub(queue, topic, flowID) } } @@ -76,16 +76,16 @@ func MainTest() { instanceID1 := os.Getpid() instanceID2 := instanceID1 + 1 - flowID1 := guuid.New() - flowID2 := guuid.New() + flowID1 := uuid.New() + flowID2 := uuid.New() g.Testing("new instances take ownership of topic+name combo", func() { q1, err := startInstance(dbpath, instanceID1, "first") g.TErrorIf(err) defer q1.Close() - pub(q1, topic, guuid.New()) - pub(q1, topic, guuid.New()) + pub(q1, topic, uuid.New()) + pub(q1, topic, uuid.New()) pub(q1, topic, flowID1) <- q1.WaitFor("individual-first", flowID1, "w").Channel @@ -97,8 +97,8 @@ func MainTest() { <- q2.WaitFor("individual-second", flowID1, "w").Channel - pub(q2, topic, guuid.New()) - pub(q2, topic, guuid.New()) + pub(q2, topic, uuid.New()) + pub(q2, topic, uuid.New()) pub(q2, topic, flowID2) // FIXME: notify multiple instances so we can add this: diff --git a/tests/functional/wait-after-publish/fiinha.go b/tests/functional/wait-after-publish/fiinha.go index a60a57b..71b9b56 100644 --- a/tests/functional/wait-after-publish/fiinha.go +++ b/tests/functional/wait-after-publish/fiinha.go @@ -3,7 +3,7 @@ package fiinha import ( "runtime" - "guuid" + "uuid" g "gobang" ) @@ -22,7 +22,7 @@ func MainTest() { g.TErrorIf(err) defer queue.Close() - pub := func(flowID guuid.UUID, payload []byte) { + pub := func(flowID uuid.UUID, payload []byte) { unsent := UnsentMessage{ Topic: topic, FlowID: flowID, @@ -34,7 +34,7 @@ func MainTest() { g.Testing("we can WaitFor() a message before its publishing", func() { - flowID := guuid.New() + flowID := uuid.New() waiter := queue.WaitFor(topic, flowID, "waiter").Channel pub(flowID, []byte("payload before")) @@ -44,7 +44,7 @@ func MainTest() { }) g.Testing("we can also do it after its publishing", func() { - flowID := guuid.New() + flowID := uuid.New() pub(flowID, []byte("payload after")) |
