Skip to content

Instantly share code, notes, and snippets.

@kjmkznr
Created October 5, 2016 15:33
Show Gist options
  • Save kjmkznr/40cb58e0c5542be503387625e4cfeb2d to your computer and use it in GitHub Desktop.
Save kjmkznr/40cb58e0c5542be503387625e4cfeb2d to your computer and use it in GitHub Desktop.
$ go test -race
2016/10/05 14:58:28 S3 Bucket Cache Set - {"CacheItem":{"Timestamp":"2016-10-05T14:58:28.563142289Z","TTL":2000000000},"Name":"bucket_test_add","Location":"eu-west-1"}
2016/10/05 14:58:28 S3 Bucket Cache Hit - {"CacheItem":{"Timestamp":"2016-10-05T14:58:28.563142289Z","TTL":2000000000},"Name":"bucket_test_add","Location":"eu-west-1"}
2016/10/05 14:58:28 S3 Bucket Cache Set - {"CacheItem":{"Timestamp":"2016-10-05T14:58:28.56391918Z","TTL":2000000000},"Name":"bucket_test_expire","Location":"eu-west-1"}
2016/10/05 14:58:31 S3 Bucket Cache Miss - {"Name":"bucket_test_expire"}
2016/10/05 14:58:31 S3 Object Cache Miss - {"Key":"object_test_add"}
==================
--- FAIL: TestCacheObjectGet (0.00s)
WARNING: DATA RACE
Write at 0x00c4200814d0 by goroutine 10:
runtime.mapassign1()
/usr/lib/go/src/runtime/hashmap.go:442 +0x0
github.com/qstorey/S3Proxy/S3Proxy.CacheObjectSet()
/home/kkojima/repos/src/github.com/qstorey/S3Proxy/S3Proxy/cache.go:107 +0x1d1
cache_test.go:104: For object Expect SS3ObjectCacheItem Got <nil>
github.com/qstorey/S3Proxy/S3Proxy.TestCacheObjectGet.func1()
/home/kkojima/repos/src/github.com/qstorey/S3Proxy/S3Proxy/cache_test.go:72 +0x7e
Previous read at 0x00c4200814d0 by goroutine 9:
runtime.mapaccess2_faststr()
/usr/lib/go/src/runtime/hashmap_fast.go:297 +0x0
github.com/qstorey/S3Proxy/S3Proxy.CacheObjectGet()
/home/kkojima/repos/src/github.com/qstorey/S3Proxy/S3Proxy/cache.go:86 +0x88
github.com/qstorey/S3Proxy/S3Proxy.TestCacheObjectGet()
/home/kkojima/repos/src/github.com/qstorey/S3Proxy/S3Proxy/cache_test.go:76 +0x143
testing.tRunner()
/usr/lib/go/src/testing/testing.go:610 +0xc9
Goroutine 10 (running) created at:
github.com/qstorey/S3Proxy/S3Proxy.TestCacheObjectGet()
/home/kkojima/repos/src/github.com/qstorey/S3Proxy/S3Proxy/cache_test.go:74 +0x12a
testing.tRunner()
/usr/lib/go/src/testing/testing.go:610 +0xc9
Goroutine 9 (running) created at:
testing.(*T).Run()
/usr/lib/go/src/testing/testing.go:646 +0x52f
testing.RunTests.func1()
/usr/lib/go/src/testing/testing.go:793 +0xb9
testing.tRunner()
/usr/lib/go/src/testing/testing.go:610 +0xc9
testing.RunTests()
/usr/lib/go/src/testing/testing.go:799 +0x4ba
testing.(*M).Run()
/usr/lib/go/src/testing/testing.go:743 +0x12f
main.main()
github.com/qstorey/S3Proxy/S3Proxy/_test/_testmain.go:64 +0x1b8
==================
==================
WARNING: DATA RACE
Write at 0x0000009a9628 by goroutine 11:
github.com/qstorey/S3Proxy/S3Proxy.TestCacheObjectExpire()
/home/kkojima/repos/src/github.com/qstorey/S3Proxy/S3Proxy/cache_test.go:110 +0xe6
testing.tRunner()
/usr/lib/go/src/testing/testing.go:610 +0xc9
Previous read at 0x0000009a9628 by goroutine 10:
github.com/qstorey/S3Proxy/S3Proxy.CacheObjectSet()
/home/kkojima/repos/src/github.com/qstorey/S3Proxy/S3Proxy/cache.go:102 +0xb4
github.com/qstorey/S3Proxy/S3Proxy.TestCacheObjectGet.func1()
/home/kkojima/repos/src/github.com/qstorey/S3Proxy/S3Proxy/cache_test.go:72 +0x7e
Goroutine 11 (running) created at:
testing.(*T).Run()
/usr/lib/go/src/testing/testing.go:646 +0x52f
testing.RunTests.func1()
/usr/lib/go/src/testing/testing.go:793 +0xb9
testing.tRunner()
/usr/lib/go/src/testing/testing.go:610 +0xc9
testing.RunTests()
/usr/lib/go/src/testing/testing.go:799 +0x4ba
testing.(*M).Run()
/usr/lib/go/src/testing/testing.go:743 +0x12f
main.main()
github.com/qstorey/S3Proxy/S3Proxy/_test/_testmain.go:64 +0x1b8
Goroutine 10 (running) created at:
github.com/qstorey/S3Proxy/S3Proxy.TestCacheObjectGet()
/home/kkojima/repos/src/github.com/qstorey/S3Proxy/S3Proxy/cache_test.go:74 +0x12a
testing.tRunner()
/usr/lib/go/src/testing/testing.go:610 +0xc9
==================
2016/10/05 14:58:31 S3 Object Cache Set - {"CacheItem":{"Timestamp":"2016-10-05T14:58:31.64407267Z","TTL":2000000000},"Key":"object_test_expire","Bucket":"bucket","FilePath":"/file/path"}
2016/10/05 14:58:31 S3 Object Cache Set - {"CacheItem":{"Timestamp":"2016-10-05T14:58:31.639105349Z","TTL":2000000000},"Key":"object_test_add","Bucket":"bucket","FilePath":"/file/path"}
2016/10/05 14:58:31 S3 Object Cache Set - {"CacheItem":{"Timestamp":"2016-10-05T14:58:31.646909668Z","TTL":2000000000},"Key":"object_test_add","Bucket":"bucket","FilePath":"/file/path"}
2016/10/05 14:58:31 S3 Object Cache Set - {"CacheItem":{"Timestamp":"2016-10-05T14:58:31.647261645Z","TTL":2000000000},"Key":"object_test_add","Bucket":"bucket","FilePath":"/file/path"}
2016/10/05 14:58:31 S3 Object Cache Set - {"CacheItem":{"Timestamp":"2016-10-05T14:58:31.647778261Z","TTL":2000000000},"Key":"object_test_add","Bucket":"bucket","FilePath":"/file/path"}
2016/10/05 14:58:31 S3 Object Cache Set - {"CacheItem":{"Timestamp":"2016-10-05T14:58:31.648120856Z","TTL":2000000000},"Key":"object_test_add","Bucket":"bucket","FilePath":"/file/path"}
2016/10/05 14:58:31 S3 Object Cache Set - {"CacheItem":{"Timestamp":"2016-10-05T14:58:31.648733107Z","TTL":2000000000},"Key":"object_test_add","Bucket":"bucket","FilePath":"/file/path"}
2016/10/05 14:58:31 S3 Object Cache Set - {"CacheItem":{"Timestamp":"2016-10-05T14:58:31.649619253Z","TTL":2000000000},"Key":"object_test_add","Bucket":"bucket","FilePath":"/file/path"}
2016/10/05 14:58:31 S3 Object Cache Set - {"CacheItem":{"Timestamp":"2016-10-05T14:58:31.650121342Z","TTL":2000000000},"Key":"object_test_add","Bucket":"bucket","FilePath":"/file/path"}
2016/10/05 14:58:31 S3 Object Cache Set - {"CacheItem":{"Timestamp":"2016-10-05T14:58:31.650686079Z","TTL":2000000000},"Key":"object_test_add","Bucket":"bucket","FilePath":"/file/path"}
2016/10/05 14:58:31 S3 Object Cache Set - {"CacheItem":{"Timestamp":"2016-10-05T14:58:31.651101611Z","TTL":2000000000},"Key":"object_test_add","Bucket":"bucket","FilePath":"/file/path"}
2016/10/05 14:58:34 S3 Object Cache Miss - {"Key":"object_test_expire"}
2016/10/05 14:58:34 Directory /tmp/S3Proxy/ already exists. Skipping mkdir.
FAIL
exit status 1
FAIL github.com/qstorey/S3Proxy/S3Proxy 6.375s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment