Messaging service, adapters, refactoring

This commit is contained in:
2023-12-07 09:00:30 +03:00
parent cf00cfaab6
commit 08a7c9c04f
18 changed files with 623 additions and 53 deletions

View File

@@ -17,7 +17,8 @@ func TestIface(t *testing.T) {
ctx, cancel := signal.NotifyContext(context.Background(), os.Kill, os.Interrupt)
t.Cleanup(cancel)
ctx, _ = context.WithTimeout(ctx, time.Second*5)
ctx, cancel = context.WithTimeout(ctx, time.Second*5)
t.Cleanup(cancel)
set, err := NewDiscoverySet(zaptest.NewLogger(t).Named("discovery"), 1234, WithDebug())
require.NoError(t, err)
@@ -34,5 +35,5 @@ func TestIface(t *testing.T) {
}()
wg.Wait()
assert.Len(t, set[0].Nodes(), 1)
assert.Len(t, set[0].NewNodes(), 1)
}