vmware-tanzu / apps-cli-plugin

Apps Plugin for the Tanzu CLI
Apache License 2.0
18 stars 16 forks source link

wait timeout test cases for workload update, create , apply and delete in windows OS has been skipped #347

Open shaheerkootteeri opened 1 year ago

shaheerkootteeri commented 1 year ago

Please fill out the issue checklist below and provide ALL the requested information.

Describe the bug

A clear and concise description of what the bug is. wait timeout test cases for workload update, create , apply and delete in windows OS has been skipped due to context not being closed on the specified time when creating context with context.WithTimeout(ctx, 1 * time.Nanosecond)

An issue related to this is being discussed in the below threads

https://github.com/golang/go/issues/44608 https://github.com/golang/go/issues/44343

Expected behavior

A clear and concise description of what you expected to happen. context to get cancelled on the time specified

Steps to Reproduce

Steps to reproduce the behavior:

go env

set GO111MODULE= set GOARCH=amd64 set GOBIN= set GOCACHE=C:\Users\Shaheer\AppData\Local\go-build set GOENV=C:\Users\Shaheer\AppData\Roaming\go\env set GOEXE=.exe set GOEXPERIMENT= set GOFLAGS= set GOHOSTARCH=amd64 set GOHOSTOS=windows set GOINSECURE= set GOMODCACHE=C:\Users\Shaheer\go\pkg\mod set GONOPROXY= set GONOSUMDB= set GOOS=windows set GOPATH=C:\Users\Shaheer\go set GOPRIVATE= set GOPROXY=https://proxy.golang.org,direct set GOROOT=C:\Program Files\Go set GOSUMDB=sum.golang.org set GOTMPDIR= set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64 set GOVCS= set GOVERSION=go1.18.4 set GCCGO=gccgo set GOAMD64=v1 set AR=ar set CC=gcc set CXX=g++ set CGO_ENABLED=1 set GOMOD=NUL set GOWORK= set CGO_CFLAGS=-g -O2 set CGO_CPPFLAGS= set CGO_CXXFLAGS=-g -O2 set CGO_FFLAGS=-g -O2 set CGO_LDFLAGS=-g -O2 set PKG_CONFIG=pkg-config set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\Shaheer\AppData\Local\Temp\go-build2534722781=/tmp/go-build -gno-record-gcc-switches

go version go1.18.4 windows/amd64

ran below code

t := time.NewTicker(time.Microsecond * 5) defer t.Stop() cntxt, cancelFunc := context.WithTimeout(context.Background(), time.Duration(time.Nanosecond*1)) start := time.Now() defer cancelFunc() select { case <-cntxt.Done(): elapsed := time.Since(start) fmt.Printf("context took %s", elapsed) cancelFunc() fmt.Println() fmt.Println("cntxt timeout") case <-t.C: elapsed := time.Since(start) fmt.Printf("Ticker took %s", elapsed) fmt.Println() }

Expected to have context cancelled first before timer ticks.

Screenshots

If applicable, add screenshots to help explain your problem.

image

Version (Apps plugin version, Version of K8s running on cluster)

Put the output of the following commad

tanzu version && tanzu apps version

Environment where the bug was observed (cloud, OS, etc)

Additional context & Relevant Debug Output (Logs, etc)

Add any other context about the problem here.

heyjcollins commented 8 months ago

Not migrated given this hasn't been picked up by the team for over a year. If this is still valid/feasible, let's chat.