Skip to content

Commit

Permalink
[WIP] remove debugging related stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
norbjd committed Apr 7, 2024
1 parent cfa1b7a commit 0aaa024
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
5 changes: 1 addition & 4 deletions test/e2e-kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,7 @@ kubectl -n "${KOURIER_GATEWAY_NAMESPACE}" patch deployment/3scale-kourier-gatewa
kubectl -n "${KOURIER_GATEWAY_NAMESPACE}" rollout status deployment/3scale-kourier-gateway --timeout=300s

echo ">> Running graceful shutdown tests"
go test -v -race -count=1 -timeout=20m -tags=e2e ./test/gracefulshutdown \
go test -race -count=1 -timeout=20m -tags=e2e ./test/gracefulshutdown \
--ingressendpoint="${IPS[0]}" \
--ingressClass=kourier.ingress.networking.knative.dev \
--cluster-suffix="$CLUSTER_SUFFIX"

kubectl -n "${KOURIER_GATEWAY_NAMESPACE}" get pods -l app=3scale-kourier-gateway -o json
kubectl -n "${KOURIER_GATEWAY_NAMESPACE}" logs -l app=3scale-kourier-gateway
6 changes: 2 additions & 4 deletions test/gracefulshutdown/gracefulshutdown_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
"errors"
"fmt"
"io"
"log"
"net/http"
"net/url"
"os"
Expand Down Expand Up @@ -164,15 +163,14 @@ func sendRequest(client *http.Client, name string, requestTimeout time.Duration)
resp, err := client.Do(req)
if err != nil {
var errURL *url.Error
if errors.As(err, &errURL) && errURL.Unwrap() == io.EOF {
// When the gateway cuts the connection (after completing the drain process), an EOF error is returned to the client
if errors.As(err, &errURL) && errors.Is(errURL, io.EOF) {
return 0, nil
}

return 0, err
}
defer resp.Body.Close()

log.Printf("sendRequest %s: %+v", requestTimeout, resp)

return resp.StatusCode, nil
}

0 comments on commit 0aaa024

Please sign in to comment.