Skip to content

Commit

Permalink
Merge branch 'master' into legacy-valid-batch-count
Browse files Browse the repository at this point in the history
  • Loading branch information
PlasmaPower authored Jul 12, 2023
2 parents b7fe193 + 5523970 commit b77f84d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ jobs:

- name: Set environment variables
run: |
mkdir -p target/tmp
echo "TMPDIR=$(pwd)/target/tmp" >> "$GITHUB_ENV"
mkdir -p target/tmp/deadbeefbee
echo "TMPDIR=$(pwd)/target/tmp/deadbeefbee" >> "$GITHUB_ENV"
echo "GOMEMLIMIT=6GiB" >> "$GITHUB_ENV"
echo "GOGC=80" >> "$GITHUB_ENV"
Expand Down
14 changes: 13 additions & 1 deletion system_tests/forwarder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"context"
"fmt"
"math/big"
"os"
"path/filepath"
"strings"
"sync"
Expand Down Expand Up @@ -157,7 +158,18 @@ func createSequencer(

// tmpPath returns file path with specified filename from temporary directory of the test.
func tmpPath(t *testing.T, filename string) string {
return filepath.Join(t.TempDir(), filename)
t.Helper()
// create a unique, maximum 10 characters-long temporary directory {name} with path as $TMPDIR/{name}
tmpDir, err := os.MkdirTemp("", "")
if err != nil {
t.Fatalf("Failed to create temp dir: %v", err)
}
t.Cleanup(func() {
if err = os.RemoveAll(tmpDir); err != nil {
t.Errorf("Failed to cleanup temp dir: %v", err)
}
})
return filepath.Join(tmpDir, filename)
}

// testNodes creates specified number of paths for ipc from temporary directory of the test.
Expand Down

0 comments on commit b77f84d

Please sign in to comment.