bzimmer / activity Goto Github PK
View Code? Open in Web Editor NEWClient libraries for activity-based services (Strava, Ride with GPS, Cycling Analytics, and more).
License: MIT License
Client libraries for activity-based services (Strava, Ride with GPS, Cycling Analytics, and more).
License: MIT License
~/Development/src/github.com/bzimmer/activity (actions) > task test
task: [build:dist] mkdir -p /Users/bzimmer/Development/src/github.com/bzimmer/activity/dist
task: [build:test] go test -timeout 20s -race -count=1 -covermode atomic -coverprofile /Users/bzimmer/Development/src/github.com/bzimmer/activity/dist/coverage.txt ./...
ok github.com/bzimmer/activity 0.178s coverage: 92.2% of statements
ok github.com/bzimmer/activity/cyclinganalytics 0.173s coverage: 84.1% of statements
ok github.com/bzimmer/activity/rwgps 0.288s coverage: 66.1% of statements
ok github.com/bzimmer/activity/strava 0.590s coverage: 82.2% of statements
==================
WARNING: DATA RACE
Write at 0x00c00001e7f0 by goroutine 11:
runtime.recvDirect()
/opt/homebrew/Cellar/go/1.20.3/libexec/src/runtime/chan.go:348 +0x7c
github.com/bzimmer/activity/zwift_test.TestTokenRefresh.func1()
/Users/bzimmer/Development/src/github.com/bzimmer/activity/zwift/zwift_test.go:138 +0x8e8
testing.tRunner()
/opt/homebrew/Cellar/go/1.20.3/libexec/src/testing/testing.go:1576 +0x188
testing.(*T).Run.func1()
/opt/homebrew/Cellar/go/1.20.3/libexec/src/testing/testing.go:1629 +0x40
Previous read at 0x00c00001e7f0 by goroutine 286:
runtime.chansend1()
/opt/homebrew/Cellar/go/1.20.3/libexec/src/runtime/chan.go:146 +0x2c
github.com/bzimmer/activity/zwift_test.tokenMux.func1()
/Users/bzimmer/Development/src/github.com/bzimmer/activity/zwift/zwift_test.go:44 +0xd8
net/http.HandlerFunc.ServeHTTP()
/opt/homebrew/Cellar/go/1.20.3/libexec/src/net/http/server.go:2122 +0x48
net/http.(*ServeMux).ServeHTTP()
/opt/homebrew/Cellar/go/1.20.3/libexec/src/net/http/server.go:2500 +0x9c
net/http.serverHandler.ServeHTTP()
/opt/homebrew/Cellar/go/1.20.3/libexec/src/net/http/server.go:2936 +0x548
net/http.(*conn).serve()
/opt/homebrew/Cellar/go/1.20.3/libexec/src/net/http/server.go:1995 +0x8d8
net/http.(*Server).Serve.func3()
/opt/homebrew/Cellar/go/1.20.3/libexec/src/net/http/server.go:3089 +0x4c
Goroutine 11 (running) created at:
testing.(*T).Run()
/opt/homebrew/Cellar/go/1.20.3/libexec/src/testing/testing.go:1629 +0x5e4
github.com/bzimmer/activity/zwift_test.TestTokenRefresh()
/Users/bzimmer/Development/src/github.com/bzimmer/activity/zwift/zwift_test.go:92 +0x128
testing.tRunner()
/opt/homebrew/Cellar/go/1.20.3/libexec/src/testing/testing.go:1576 +0x188
testing.(*T).Run.func1()
/opt/homebrew/Cellar/go/1.20.3/libexec/src/testing/testing.go:1629 +0x40
Goroutine 286 (running) created at:
net/http.(*Server).Serve()
/opt/homebrew/Cellar/go/1.20.3/libexec/src/net/http/server.go:3089 +0x620
net/http/httptest.(*Server).goServe.func1()
/opt/homebrew/Cellar/go/1.20.3/libexec/src/net/http/httptest/server.go:310 +0xa0
==================
2023/04/25 06:52:52 http: panic serving 127.0.0.1:53457: send on closed channel
goroutine 330 [running]:
net/http.(*conn).serve.func1()
/opt/homebrew/Cellar/go/1.20.3/libexec/src/net/http/server.go:1854 +0xe4
panic({0x104f9a280, 0x105001130})
/opt/homebrew/Cellar/go/1.20.3/libexec/src/runtime/panic.go:890 +0x258
github.com/bzimmer/activity/zwift_test.tokenMux.func1({0x105004540, 0xc0008ec000}, 0xc000529200)
/Users/bzimmer/Development/src/github.com/bzimmer/activity/zwift/zwift_test.go:41 +0xf8
net/http.HandlerFunc.ServeHTTP(0xc00000c480, {0x105004540, 0xc0008ec000}, 0x104e391c0?)
/opt/homebrew/Cellar/go/1.20.3/libexec/src/net/http/server.go:2122 +0x4c
net/http.(*ServeMux).ServeHTTP(0x0?, {0x105004540, 0xc0008ec000}, 0xc000529200)
/opt/homebrew/Cellar/go/1.20.3/libexec/src/net/http/server.go:2500 +0xa0
net/http.serverHandler.ServeHTTP({0x105003340?}, {0x105004540, 0xc0008ec000}, 0xc000529200)
/opt/homebrew/Cellar/go/1.20.3/libexec/src/net/http/server.go:2936 +0x54c
net/http.(*conn).serve(0xc0005255f0, {0x105004858, 0xc0001160c0})
/opt/homebrew/Cellar/go/1.20.3/libexec/src/net/http/server.go:1995 +0x8dc
created by net/http.(*Server).Serve
/opt/homebrew/Cellar/go/1.20.3/libexec/src/net/http/server.go:3089 +0x624
--- FAIL: TestTokenRefresh (1.01s)
zwift_test.go:137:
Error Trace: /Users/bzimmer/Development/src/github.com/bzimmer/activity/zwift/zwift_test.go:137
Error: Received unexpected error:
context deadline exceeded
Test: TestTokenRefresh
zwift_test.go:153:
Error Trace: /Users/bzimmer/Development/src/github.com/bzimmer/activity/zwift/zwift_test.go:153
Error: Not equal:
expected: 100
actual : 99
Test: TestTokenRefresh
--- FAIL: TestTokenRefresh/success_100 (1.01s)
testing.go:1446: race detected during execution of test
testing.go:1446: race detected during execution of test
FAIL
github.com/bzimmer/activity/zwift coverage: 49.0% of statements
FAIL github.com/bzimmer/activity/zwift 1.397s
FAIL
task: Failed to run task "test": task: Failed to run task "build:test": exit status 1
task: Failed to run task "test": task: Failed to run task "build:test": exit status 1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.