Skip to content

Commit 8d00d28

Browse files
committed
Increase timeout
1 parent e591a0f commit 8d00d28

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

backend/redis/expire_test.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func Test_AutoExpiration(t *testing.T) {
1818
t.Skip()
1919
}
2020

21-
autoExpirationTime := time.Second * 1
21+
autoExpirationTime := time.Second * 2
2222

2323
redisClient := getClient()
2424
setup := getCreateBackend(redisClient, WithAutoExpiration(autoExpirationTime))
@@ -45,7 +45,7 @@ func Test_AutoExpiration(t *testing.T) {
4545
require.NoError(t, c.WaitForWorkflowInstance(ctx, wfi, time.Second*10))
4646

4747
// Wait for redis to expire the keys
48-
time.Sleep(autoExpirationTime)
48+
time.Sleep(autoExpirationTime * 2)
4949

5050
_, err = b.GetWorkflowInstanceState(ctx, wfi)
5151
require.ErrorIs(t, err, backend.ErrInstanceNotFound)
@@ -59,7 +59,7 @@ func Test_AutoExpiration_SubWorkflow(t *testing.T) {
5959
t.Skip()
6060
}
6161

62-
autoExpirationTime := time.Second * 1
62+
autoExpirationTime := time.Second * 2
6363

6464
redisClient := getClient()
6565
setup := getCreateBackend(redisClient, WithAutoExpiration(autoExpirationTime))
@@ -84,6 +84,9 @@ func Test_AutoExpiration_SubWorkflow(t *testing.T) {
8484
swfInstanceID := uuid.NewString()
8585

8686
wf := func(ctx workflow.Context) (int, error) {
87+
l := workflow.Logger(ctx)
88+
l.Debug("Starting sub workflow", "instanceID", swfInstanceID)
89+
8790
r, err := workflow.CreateSubWorkflowInstance[int](ctx, workflow.SubWorkflowOptions{
8891
InstanceID: swfInstanceID,
8992
}, swf).Get(ctx)

0 commit comments

Comments
 (0)