Skip to content

Commit 1c20664

Browse files
committed
update based on reviews
1 parent 3d10bcd commit 1c20664

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

internal/mode/static/state/graph/route_common.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ func isolateHostnamesForParentRefs(parentRef []ParentRef, listenerHostnameMap ma
395395
for _, ref := range parentRef {
396396
acceptedHostnames := ref.Attachment.AcceptedHostnames
397397

398-
hostnamesToRemoves := make(map[string]struct{}, len(acceptedHostnames))
398+
hostnamesToRemoves := make(map[string]struct{})
399399
for listenerName, hostnames := range acceptedHostnames {
400400
if len(hostnames) == 0 {
401401
continue

internal/mode/static/state/graph/route_common_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2177,6 +2177,7 @@ func TestTryToAttachL4RouteToListeners_NoAttachableListeners(t *testing.T) {
21772177
}
21782178

21792179
func TestIsolateL4Listeners(t *testing.T) {
2180+
t.Parallel()
21802181
gw := &gatewayv1.Gateway{
21812182
ObjectMeta: metav1.ObjectMeta{
21822183
Namespace: "test",
@@ -2426,6 +2427,7 @@ func TestIsolateL4Listeners(t *testing.T) {
24262427
}
24272428

24282429
func TestIsolateL7Listeners(t *testing.T) {
2430+
t.Parallel()
24292431
gw := &gatewayv1.Gateway{
24302432
ObjectMeta: metav1.ObjectMeta{
24312433
Namespace: "test",
@@ -2677,6 +2679,7 @@ func TestIsolateL7Listeners(t *testing.T) {
26772679
}
26782680

26792681
func TestRemoveHostnames(t *testing.T) {
2682+
t.Parallel()
26802683
tests := []struct {
26812684
name string
26822685
hostnames []string
@@ -2713,6 +2716,7 @@ func TestRemoveHostnames(t *testing.T) {
27132716

27142717
for _, tt := range tests {
27152718
t.Run(tt.name, func(t *testing.T) {
2719+
t.Parallel()
27162720
g := NewWithT(t)
27172721
result := removeHostnames(tt.hostnames, tt.removeHostnames)
27182722
g.Expect(result).To(Equal(tt.expectedHostnames))

0 commit comments

Comments
 (0)