xcherryio / sdk-go

Golang SDK for xCherry
Apache License 2.0
1 stars 0 forks source link

Potential bug: flaky test for DescribeProcess API caused by url.Error with empty error message #22

Open longquanzheng opened 1 year ago

longquanzheng commented 1 year ago

See https://github.com/golang/go/issues/63773

longquanzheng commented 1 year ago

more details:

2023-11-01T18:36:06.2981676Z {"level":"debug","ts":"2023-11-01T18:35:44.987Z","msg":"immediate task executed","service":"async","status":200,"logging-call-at":"immediate_task_conrrent_processor.go:495"}
2023-11-01T18:36:06.2983751Z DescribeCurrentProcessExecution is requested {"namespace":"default","processId":"test1698863743951450676"}
2023-11-01T18:36:06.2984855Z 2023/11/01 18:35:48 
2023-11-01T18:36:06.2985581Z POST /api/v1/xdb/service/process-execution/describe HTTP/1.1
2023-11-01T18:36:06.2986354Z Host: localhost:8801
2023-11-01T18:36:06.2986841Z Content-Length: 62
2023-11-01T18:36:06.2987987Z Accept: application/json
2023-11-01T18:36:06.2988586Z Content-Type: application/json
2023-11-01T18:36:06.2989156Z Accept-Encoding: gzip
2023-11-01T18:36:06.2989443Z 
2023-11-01T18:36:06.2989805Z {"namespace":"default","processId":"test1698863743951450676"}
2023-11-01T18:36:06.2990356Z 
2023-11-01T18:36:06.2990541Z encounter url.Error EOF EOF
2023-11-01T18:36:06.2991127Z url.Error.Err type *errors.errorString  ptr
2023-11-01T18:36:06.2992894Z DescribeCurrentProcessExecution is responded null {"Op":"Post","URL":"http://localhost:8801/api/v1/xdb/service/process-execution/describe","Err":{}}
2023-11-01T18:36:06.2994410Z     io_process.go:142: 
2023-11-01T18:36:06.2996414Z            Error Trace:    /home/runner/go/pkg/mod/github.com/xdblab/xdb-golang-sdk@v0.0.0-20231101182405-2a830a4d4b2b/integTests/basic/io_process.go:142
2023-11-01T18:36:06.3001033Z            Error:          Expected nil, but got: &xdb.ApiError{StatusCode:0, OriginalError:(*url.Error)(0xc0005f4c00), OpenApiError:(*xdbapi.GenericOpenAPIError)(nil), HttpResponse:(*http.Response)(nil), Response:(*xdbapi.ApiErrorResponse)(nil)}
2023-11-01T18:36:06.3003651Z            Test:           TestProcessIdReusePolicyAllowIfPreviousExitAbnormallyCase1
2023-11-01T18:36:06.3004817Z     io_process.go:143: 
2023-11-01T18:36:06.3006850Z            Error Trace:    /home/runner/go/pkg/mod/github.com/xdblab/xdb-golang-sdk@v0.0.0-20231101182405-2a830a4d4b2b/integTests/basic/io_process.go:143
2023-11-01T18:36:06.3008392Z            Error:          Not equal: 
2023-11-01T18:36:06.3009158Z                            expected: "COMPLETED"
2023-11-01T18:36:06.3009920Z                            actual  : ""
2023-11-01T18:36:06.3010511Z                            
2023-11-01T18:36:06.3011034Z                            Diff:
2023-11-01T18:36:06.3012034Z                            --- Expected
2023-11-01T18:36:06.3012709Z                            +++ Actual
2023-11-01T18:36:06.3013453Z                            @@ -1,2 +1,2 @@
2023-11-01T18:36:06.3014558Z                            -(xdbapi.ProcessStatus) (len=9) "COMPLETED"
2023-11-01T18:36:06.3015565Z                            +(xdbapi.ProcessStatus) ""
2023-11-01T18:36:06.3016251Z                             
2023-11-01T18:36:06.3017278Z            Test:           TestProcessIdReusePolicyAllowIfPreviousExitAbnormallyCase1
2023-11-01T18:36:06.3021349Z ProcessExecutionStartRequest is requested {"namespace":"default","processId":"test1698863743951450676","processStartConfig":{"idReusePolicy":"ALLOW_IF_PREVIOUS_EXIT_ABNORMALLY","timeoutSeconds":0},"processType":"basic.IOProcess","startStateConfig":{},"startStateId":"basic.state1","startStateInput":{"data":"123","encoding":"golangJson"},"workerUrl":"http://localhost:8803"}