Skip to content

Commit

Permalink
feat(enhancement): add ForwardTo and RemoteForward (#538)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tochemey authored Nov 28, 2024
1 parent 92fe147 commit 4fda560
Show file tree
Hide file tree
Showing 17 changed files with 2,523 additions and 2,282 deletions.
3,023 changes: 1,465 additions & 1,558 deletions actors/actor_system_test.go

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions actors/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func TestAsk(t *testing.T) {

// create a test actor
actorName := "test"
actor := newTestActor()
actor := newActor()
actorRef, err := sys.Spawn(ctx, actorName, actor)
require.NoError(t, err)
assert.NotNil(t, actorRef)
Expand Down Expand Up @@ -105,7 +105,7 @@ func TestAsk(t *testing.T) {

// create a test actor
actorName := "test"
actor := newTestActor()
actor := newActor()
actorRef, err := sys.Spawn(ctx, actorName, actor)
require.NoError(t, err)
assert.NotNil(t, actorRef)
Expand Down Expand Up @@ -149,7 +149,7 @@ func TestAsk(t *testing.T) {

// create a test actor
actorName := "test"
actor := newTestActor()
actor := newActor()
actorRef, err := sys.Spawn(ctx, actorName, actor)
require.NoError(t, err)
assert.NotNil(t, actorRef)
Expand Down Expand Up @@ -189,7 +189,7 @@ func TestAsk(t *testing.T) {

// create a test actor
actorName := "test"
actor := newTestActor()
actor := newActor()
actorRef, err := sys.Spawn(ctx, actorName, actor)
require.NoError(t, err)
assert.NotNil(t, actorRef)
Expand Down Expand Up @@ -232,7 +232,7 @@ func TestAsk(t *testing.T) {

// create a test actor
actorName := "test"
actor := newTestActor()
actor := newActor()
actorRef, err := sys.Spawn(ctx, actorName, actor)
require.NoError(t, err)
assert.NotNil(t, actorRef)
Expand Down Expand Up @@ -277,7 +277,7 @@ func TestAsk(t *testing.T) {

// create a test actor
actorName := "test"
actor := newTestActor()
actor := newActor()
actorRef, err := sys.Spawn(ctx, actorName, actor)
require.NoError(t, err)
assert.NotNil(t, actorRef)
Expand Down Expand Up @@ -320,7 +320,7 @@ func TestAsk(t *testing.T) {

// create a test actor
actorName := "test"
actor := newTestActor()
actor := newActor()
actorRef, err := sys.Spawn(ctx, actorName, actor)
require.NoError(t, err)
assert.NotNil(t, actorRef)
Expand Down Expand Up @@ -364,7 +364,7 @@ func TestTell(t *testing.T) {

// create a test actor
actorName := "test"
actor := newTestActor()
actor := newActor()
actorRef, err := sys.Spawn(ctx, actorName, actor)
require.NoError(t, err)
assert.NotNil(t, actorRef)
Expand Down Expand Up @@ -408,7 +408,7 @@ func TestTell(t *testing.T) {

// create a test actor
actorName := "test"
actor := newTestActor()
actor := newActor()
actorRef, err := sys.Spawn(ctx, actorName, actor)
require.NoError(t, err)
assert.NotNil(t, actorRef)
Expand Down Expand Up @@ -451,7 +451,7 @@ func TestTell(t *testing.T) {

// create a test actor
actorName := "test"
actor := newTestActor()
actor := newActor()
actorRef, err := sys.Spawn(ctx, actorName, actor)
require.NoError(t, err)
assert.NotNil(t, actorRef)
Expand Down Expand Up @@ -490,7 +490,7 @@ func TestTell(t *testing.T) {

// create a test actor
actorName := "test"
actor := newTestActor()
actor := newActor()
actorRef, err := sys.Spawn(ctx, actorName, actor)
require.NoError(t, err)
assert.NotNil(t, actorRef)
Expand Down Expand Up @@ -533,7 +533,7 @@ func TestTell(t *testing.T) {

// create a test actor
actorName := "test"
actor := newTestActor()
actor := newActor()
actorRef, err := sys.Spawn(ctx, actorName, actor)
require.NoError(t, err)
assert.NotNil(t, actorRef)
Expand Down
4 changes: 2 additions & 2 deletions actors/cluster_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func TestClusterConfig(t *testing.T) {
t.Run("With happy path", func(t *testing.T) {
disco := new(testkit.Provider)
exchanger := new(exchanger)
tester := new(testActor)
tester := new(actorQA)
kinds := []Actor{tester, exchanger}
config := NewClusterConfig().
WithKinds(kinds...).
Expand All @@ -60,7 +60,7 @@ func TestClusterConfig(t *testing.T) {

t.Run("With invalid config setting", func(t *testing.T) {
config := NewClusterConfig().
WithKinds(new(exchanger), new(testActor)).
WithKinds(new(exchanger), new(actorQA)).
WithDiscoveryPort(3220).
WithPeersPort(3222).
WithMinimumPeersQuorum(1).
Expand Down
Loading

0 comments on commit 4fda560

Please sign in to comment.