diff --git a/pubsublite/pscompat/integration_test.go b/pubsublite/pscompat/integration_test.go index 52f7564bcb4a..183d5a7a4d9c 100644 --- a/pubsublite/pscompat/integration_test.go +++ b/pubsublite/pscompat/integration_test.go @@ -917,9 +917,6 @@ func TestIntegration_SeekSubscription(t *testing.T) { createSubscription(ctx, t, admin, subscriptionPath, topicPath) defer cleanUpSubscription(ctx, t, admin, subscriptionPath) - var msgBatch3 []string - var publishTimes3 *publishTimeRange - // Note: Subtests need to be run sequentially. t.Run("SeekToBeginning", func(t *testing.T) { @@ -996,25 +993,8 @@ func TestIntegration_SeekSubscription(t *testing.T) { // Publish batch 3 and verify that messages are only received from batch 3 // (batch 2 skipped). - msgBatch3 = publishPrefixedMessages(t, DefaultPublishSettings, topicPath, "seek-batch3", messageCount, 0) - publishTimes3 = receiveAllMessages(t, makeMsgTracker(msgBatch3), recvSettings, subscriptionPath) - - if seekOp != nil { - validateCompleteSeekOperation(ctx, t, subscriptionPath, seekOp) - } - }) - - t.Run("SeekToPublishTime", func(t *testing.T) { - // Seek to min publish time of batch 3. - seekOp, err := admin.SeekSubscription(ctx, subscriptionPath.String(), pubsublite.PublishTime(publishTimes3.Min())) - if err != nil { - t.Errorf("SeekSubscription() got err: %v", err) - } else { - validateNewSeekOperation(t, subscriptionPath, seekOp) - } - - // Verify that messages are received from batch 3. - receiveAllMessages(t, makeMsgTracker(msgBatch3), recvSettings, subscriptionPath) + msgBatch := publishPrefixedMessages(t, DefaultPublishSettings, topicPath, "seek-batch3", messageCount, 0) + receiveAllMessages(t, makeMsgTracker(msgBatch), recvSettings, subscriptionPath) if seekOp != nil { validateCompleteSeekOperation(ctx, t, subscriptionPath, seekOp)