Skip to content

Commit 2f64c55

Browse files
committed
refactor: maintenance refactor
1 parent 4b857b4 commit 2f64c55

File tree

1 file changed

+0
-41
lines changed

1 file changed

+0
-41
lines changed

durable_state_actor_test.go

-41
Original file line numberDiff line numberDiff line change
@@ -361,47 +361,6 @@ func TestDurableStateBehavior(t *testing.T) {
361361
assert.NoError(t, durableStore.Disconnect(ctx))
362362
eventStream.Close()
363363
})
364-
t.Run("with state recovery from state store with no latest state", func(t *testing.T) {
365-
ctx := context.TODO()
366-
actorSystem, err := goakt.NewActorSystem("TestActorSystem",
367-
goakt.WithPassivationDisabled(),
368-
goakt.WithLogger(log.DiscardLogger),
369-
goakt.WithActorInitMaxRetries(3),
370-
)
371-
require.NoError(t, err)
372-
assert.NotNil(t, actorSystem)
373-
374-
// start the actor system
375-
err = actorSystem.Start(ctx)
376-
require.NoError(t, err)
377-
378-
lib.Pause(time.Second)
379-
380-
persistenceID := uuid.NewString()
381-
behavior := NewAccountDurableStateBehavior(persistenceID)
382-
383-
eventStream := eventstream.New()
384-
385-
durableStore := new(mocks.StateStore)
386-
durableStore.EXPECT().Ping(mock.Anything).Return(nil)
387-
durableStore.EXPECT().GetLatestState(mock.Anything, behavior.ID()).Return(new(egopb.DurableState), nil)
388-
durableStore.EXPECT().WriteState(mock.Anything, mock.AnythingOfType("*egopb.DurableState")).Return(nil)
389-
390-
persistentActor := newDurableStateActor(behavior, durableStore, eventStream)
391-
pid, err := actorSystem.Spawn(ctx, behavior.ID(), persistentActor)
392-
require.NoError(t, err)
393-
require.NotNil(t, pid)
394-
395-
lib.Pause(time.Second)
396-
397-
err = actorSystem.Stop(ctx)
398-
require.NoError(t, err)
399-
400-
lib.Pause(time.Second)
401-
402-
eventStream.Close()
403-
durableStore.AssertExpectations(t)
404-
})
405364
t.Run("with state recovery from state store failure", func(t *testing.T) {
406365
defer goleak.VerifyNone(t)
407366
ctx := context.TODO()

0 commit comments

Comments
 (0)