Skip to content

Commit

Permalink
fix call vs request
Browse files Browse the repository at this point in the history
  • Loading branch information
rogeralsing committed Nov 20, 2023
1 parent b7133ac commit 1311ed9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions cluster/cluster_test_tool/cluster_fixture.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ package cluster_test_tool

import (
"context"
"log/slog"
"time"

"github.com/asynkron/protoactor-go/actor"
"github.com/asynkron/protoactor-go/cluster"
"github.com/asynkron/protoactor-go/cluster/clusterproviders/test"
"github.com/asynkron/protoactor-go/cluster/identitylookup/disthash"
"github.com/asynkron/protoactor-go/log"
"github.com/asynkron/protoactor-go/remote"
"github.com/google/uuid"
"golang.org/x/sync/errgroup"
Expand Down Expand Up @@ -128,7 +128,7 @@ func (b *BaseClusterFixture) RemoveNode(node *cluster.Cluster, graceful bool) {
}
}
if !has {
plog.Error("node not found", log.Object("node", node))
slog.Default().Error("node not found", slog.Any("node", node))
}
}

Expand Down Expand Up @@ -192,7 +192,7 @@ func (b *BaseClusterFixture) spawnClusterMember() *cluster.Cluster {
// waitForMembersToShutdown waits for the members to shutdown
func (b *BaseClusterFixture) waitForMembersToShutdown() {
for _, member := range b.members {
plog.Info("Preparing shutdown for cluster member", log.String("member", member.ActorSystem.ID))
slog.Default().Info("Preparing shutdown for cluster member", slog.String("member", member.ActorSystem.ID))
}

group := new(errgroup.Group)
Expand All @@ -204,7 +204,7 @@ func (b *BaseClusterFixture) waitForMembersToShutdown() {
group.Go(func() error {
done := make(chan struct{})
go func() {
plog.Info("Shutting down cluster member", log.String("member", member.ActorSystem.ID))
slog.Default().Info("Shutting down cluster member", slog.String("member", member.ActorSystem.ID))
member.Shutdown(true)
close(done)
}()
Expand Down
3 changes: 2 additions & 1 deletion cluster/cluster_test_tool/pubsub_cluster_fixture.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cluster_test_tool

import (
"errors"
"log/slog"
"math/rand"
"strconv"
"sync"
Expand Down Expand Up @@ -50,7 +51,7 @@ func NewPubSubClusterFixture(t testing.TB, clusterSize int, useDefaultTopicRegis
}
if !fixture.useDefaultTopicRegistration {
kinds = append(kinds, cluster.NewKind(cluster.TopicActorKind, actor.PropsFromProducer(func() actor.Actor {
return cluster.NewTopicActor(store)
return cluster.NewTopicActor(store, slog.Default())
})))
}
return kinds
Expand Down

0 comments on commit 1311ed9

Please sign in to comment.