Skip to content

Commit

Permalink
Merge pull request #1083 from wakatime/develop
Browse files Browse the repository at this point in the history
v1.98.3
  • Loading branch information
alanhamlett authored Jul 29, 2024
2 parents 7d81a02 + 0a98e63 commit f19650c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
4 changes: 2 additions & 2 deletions cmd/heartbeat/heartbeat_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@ func TestSendHeartbeats_RateLimited(t *testing.T) {
numCalls++
})

tmpFile, err := os.CreateTemp(t.TempDir(), "wakatime")
tmpFile, err := os.CreateTemp(t.TempDir(), "wakatime-internal-config")
require.NoError(t, err)

offlineQueueFile, err := os.CreateTemp(t.TempDir(), "")
offlineQueueFile, err := os.CreateTemp(t.TempDir(), "offline-queue-file")
require.NoError(t, err)

v := viper.New()
Expand Down
16 changes: 6 additions & 10 deletions cmd/params/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2629,12 +2629,10 @@ func TestLoadHeartbeatParams_ExtraHeartbeats_StdinReadOnlyOnce(t *testing.T) {
data, err := os.ReadFile("testdata/extra_heartbeats.json")
require.NoError(t, err)

go func() {
_, err := w.Write(data)
require.NoError(t, err)
_, err = w.Write(data)
require.NoError(t, err)

w.Close()
}()
w.Close()

v := viper.New()
v.Set("entity", "/path/to/file")
Expand All @@ -2656,12 +2654,10 @@ func TestLoadHeartbeatParams_ExtraHeartbeats_StdinReadOnlyOnce(t *testing.T) {
data, err = os.ReadFile("testdata/extra_heartbeats_with_string_values.json")
require.NoError(t, err)

go func() {
_, err := w.Write(data)
require.NoError(t, err)
_, err = w.Write(data)
require.NoError(t, err)

w.Close()
}()
w.Close()

os.Stdin = r

Expand Down

0 comments on commit f19650c

Please sign in to comment.