Agones: Flaky: TestGameServerWithPortsMappedToMultipleContainers

Created on 6 Apr 2020  路  2Comments  路  Source: googleforgames/agones

--- FAIL: TestGameServerWithPortsMappedToMultipleContainers (41.07s)
    gameserver_test.go:527: Could not message GameServer: read udp 192.168.10.2:45098->35.233.192.59:7273: read: connection refused

Seen this crop up a few times.

kinbug help wanted good first issue aretests

Most helpful comment

Easy solution might be to poll the UDP pings for a minute until it works, to account for some delay.

All 2 comments

I think there is a problem with two containers started listening the port at different time.
The Fleet configuration from the test is:

apiVersion: "agones.dev/v1"
kind: Fleet
metadata:
  name: simple-udp
spec:
  replicas: 2
  template:
    spec:
      container: simple-udp
      ports:
      - name: default
        containerPort: 7654
      - name: second-gameport
        containerPort: 5000
        container: "second-udp-server"
      template:
        spec:
          containers:
          - name: simple-udp
            image: gcr.io/agones-images/udp-server:0.19
            resources:
              requests:
                memory: "64Mi"
                cpu: "20m"
              limits:
                memory: "64Mi"
                cpu: "20m"
          - name: second-udp-server
            image: gcr.io/agones-images/udp-server:0.19
            args: ["-port", "5000"]

Easy solution might be to poll the UDP pings for a minute until it works, to account for some delay.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

markmandel picture markmandel  路  6Comments

adamhosier picture adamhosier  路  5Comments

alexandrem picture alexandrem  路  5Comments

lazeratops picture lazeratops  路  4Comments

jehan96 picture jehan96  路  5Comments