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

Prevent race condition when Windows tests reading same config file #1097

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

alanhamlett
Copy link
Member

@alanhamlett alanhamlett commented Sep 17, 2024

{"caller":"cmd/heartbeat/heartbeat.go:158","file":"testdata/main.go","func":"heartbeat.SendHeartbeats","is_write":true,"level":"error","lineno":13,"message":"failed to reset rate limit: failed to parse config file: failed creating file: open C:\\Users\\runneradmin\\.wakatime\\wakatime-internal.cfg: The system cannot find the path specified.","now":"2024-09-17T09:19:29Z","os/arch":"unset/unset","plugin":"plugin/0.0.1","time":1585598059.1,"version":"unset"}
--- FAIL: TestSendHeartbeats_RateLimited (1.69s)
    testing.go:1231: TempDir RemoveAll cleanup: remove C:\Users\RUNNER~1\AppData\Local\Temp\TestSendHeartbeats_RateLimited2560104576\001\wakatime-config621071612: The process cannot access the file because it is being used by another process.
{"caller":"cmd/heartbeat/heartbeat.go:158","file":"\\tmp\\main.go","func":"heartbeat.SendHeartbeats","is_write":true,"level":"error","lineno":13,"message":"failed to reset rate limit: failed to parse config file: failed creating file: open C:\\Users\\runneradmin\\.wakatime\\wakatime-internal.cfg: The system cannot find the path specified.","now":"2024-09-[17](https://github.com/wakatime/wakatime-cli/actions/runs/10900133075/job/30247075557#step:5:18)T09:19:31Z","os/arch":"unset/unset","plugin":"plugin","time":1585598059.1,"version":"unset"}
{"caller":"cmd/heartbeat/heartbeat.go:158","file":"testdata/main.go","func":"heartbeat.SendHeartbeats","is_write":true,"level":"error","lineno":2,"message":"failed to reset rate limit: failed to parse config file: failed creating file: open C:\\Users\\runneradmin\\.wakatime\\wakatime-internal.cfg: The system cannot find the path specified.","now":"2024-09-17T09:[19](https://github.com/wakatime/wakatime-cli/actions/runs/10900133075/job/30247075557#step:5:20):32Z","os/arch":"unset/unset","plugin":"plugin/0.0.1","time":1585598059.1,"version":"unset"}
{"caller":"cmd/heartbeat/heartbeat.go:158","file":"testdata/main.go","func":"heartbeat.SendHeartbeats","is_write":true,"level":"error","lineno":13,"message":"failed to reset rate limit: failed to parse config file: failed creating file: open C:\\Users\\runneradmin\\.wakatime\\wakatime-internal.cfg: The system cannot find the path specified.","now":"2024-09-17T09:19:32Z","os/arch":"unset/unset","plugin":"plugin/0.0.1","time":1585598059.1,"version":"unset"}

@alanhamlett alanhamlett added the bug Something isn't working label Sep 17, 2024
@alanhamlett alanhamlett self-assigned this Sep 17, 2024
@alanhamlett alanhamlett merged commit fdf4bd9 into develop Sep 17, 2024
19 checks passed
@alanhamlett alanhamlett deleted the bugfix/windows-tests branch September 17, 2024 09:30
Copy link

codecov bot commented Sep 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.05%. Comparing base (e50949f) to head (dcf9a72).
Report is 2 commits behind head on develop.

@@           Coverage Diff            @@
##           develop    #1097   +/-   ##
========================================
  Coverage    63.05%   63.05%           
========================================
  Files          383      383           
  Lines        16530    16530           
========================================
  Hits         10423    10423           
  Misses        5539     5539           
  Partials       568      568           
Flag Coverage Δ
unittests 63.05% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@alanhamlett alanhamlett mentioned this pull request Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant