test(awssd): fix a flaky test (#5552)

This commit is contained in:
vflaux 2025-06-22 11:54:52 +02:00 committed by GitHub
parent 026198429a
commit c6ffc179a3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,9 +19,7 @@ package awssd
import (
"context"
"errors"
"math/rand"
"reflect"
"strconv"
"testing"
"time"
@ -58,7 +56,7 @@ type AWSSDClientStub struct {
func (s *AWSSDClientStub) CreateService(_ context.Context, input *servicediscovery.CreateServiceInput, _ ...func(*servicediscovery.Options)) (*servicediscovery.CreateServiceOutput, error) {
srv := &types.Service{
Id: aws.String(strconv.Itoa(rand.Intn(10000))),
Id: input.Name,
DnsConfig: input.DnsConfig,
Name: input.Name,
Description: input.Description,