Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken tests with newer version(1.21.8) aws-sdk-go #137

Closed
zijima opened this issue Jul 31, 2019 · 4 comments
Closed

Broken tests with newer version(1.21.8) aws-sdk-go #137

zijima opened this issue Jul 31, 2019 · 4 comments
Labels

Comments

@zijima
Copy link

zijima commented Jul 31, 2019

Current XRay SDK depends on github.com/aws/aws-sdk-go v1.17.12

https://github.com/aws/aws-xray-sdk-go/blob/master/go.mod#L5

when using v1.21.8, several tests in xray/aws_test.go failed, inlcuding:

  • TestAWS/AWSSessionWithWhitelist()
  • TestAWS/AWSWithWhitelist()
  • TestAWS/AWSSession()
  • TestAWS/AWS()

They all have same error:

RequestError: send request failed\ncaused by: Get https://lambda.fake-moon-1.amazonaws.com/2015-03-31/functions/: dial tcp: address lambda.fake-moon-1.amazonaws.com: no suitable address found"
@stale
Copy link

stale bot commented Dec 14, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Dec 14, 2019
@bhautikpip
Copy link
Contributor

Hi @zijima,

Just wanted to follow up with you. Are you still experiencing this issue ?

@stale stale bot removed the stale label Dec 16, 2019
@awssandra awssandra added the bug label Jan 10, 2020
@shogo82148
Copy link
Contributor

Tests in xray/aws_test.go still fail in my environment.
Here is my test log on f312997
The version of AWS SDK is v1.28.1.

$ go version
go version go1.13.6 darwin/amd64
$ go get -u github.com/aws/aws-sdk-go
$ go test github.com/aws/aws-xray-sdk-go/xray -run '^(TestAWS)$' -race
2020-01-14T19:42:48+09:00 [INFO] Emitter using address: 127.0.0.1:2000
2020-01-14T19:42:48+09:00 [ERROR] write udp 127.0.0.1:63450->127.0.0.1:2000: write: message too long
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1913620]

goroutine 23 [running]:
testing.tRunner.func1(0xc00021c300)
        /usr/local/Cellar/go/1.13.6/libexec/src/testing/testing.go:874 +0x69f
panic(0x1a17320, 0x22721b0)
        /usr/local/Cellar/go/1.13.6/libexec/src/runtime/panic.go:679 +0x1b2
github.com/aws/aws-xray-sdk-go/xray.testClientFailedConnection(0xc00021c300, 0xc0000a0158)
        /Users/shogoichinose/src/github.com/shogo82148/aws-xray-sdk-go/xray/aws_test.go:156 +0x260
github.com/aws/aws-xray-sdk-go/xray.TestAWS.func5.1(0xc00021c300)
        /Users/shogoichinose/src/github.com/shogo82148/aws-xray-sdk-go/xray/aws_test.go:73 +0xe3
testing.tRunner(0xc00021c300, 0xc0000bb320)
        /usr/local/Cellar/go/1.13.6/libexec/src/testing/testing.go:909 +0x19a
created by testing.(*T).Run
        /usr/local/Cellar/go/1.13.6/libexec/src/testing/testing.go:960 +0x652
FAIL    github.com/aws/aws-xray-sdk-go/xray     1.266s
FAIL

I set the log level to debug, and ran test again.

diff --git a/xray/aws_test.go b/xray/aws_test.go
index 89bcaa8..1c17a4c 100644
--- a/xray/aws_test.go
+++ b/xray/aws_test.go
@@ -5,6 +5,7 @@ import (
 	"encoding/json"
 	"net/http"
 	"net/http/httptest"
+	"os"
 	"sync"
 	"testing"
 	"time"
@@ -13,10 +14,13 @@ import (
 	"github.com/aws/aws-sdk-go/aws/credentials"
 	"github.com/aws/aws-sdk-go/aws/session"
 	"github.com/aws/aws-sdk-go/service/lambda"
+	"github.com/aws/aws-xray-sdk-go/xraylog"
 	"github.com/stretchr/testify/assert"
 )
 
 func TestAWS(t *testing.T) {
+	SetLogger(xraylog.NewDefaultLogger(os.Stderr, xraylog.LogLevelDebug))
+
 	// Runs a suite of tests against two different methods of registering
 	// handlers on an AWS client.
 

the result is too long to paste here... please see my gist.
https://gist.github.com/shogo82148/80f1468535926483b32593ceb2fedb14

@bhautikpip
Copy link
Contributor

Hi @zijima,

We have recently merged this PR (#177). That should solve this issue. So, I am closing this issue. Feel free to re open if you see any more issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants