Skip to content

Commit

Permalink
Use new pid for PocketIC instance.
Browse files Browse the repository at this point in the history
  • Loading branch information
q-uint committed May 6, 2024
1 parent 6523692 commit 40dc28e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pocketic/pocketic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ import (
"strings"
"sync"
"testing"
"time"
)

func TestConcurrentCalls(t *testing.T) {
pic, err := pocketic.New()
pic, err := pocketic.New(pocketic.WithPollingDelay(10*time.Millisecond, 10*time.Second))
if err != nil {
t.Fatal(err)
}
Expand Down
2 changes: 1 addition & 1 deletion pocketic/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func newServer(opts ...serverOption) (*server, error) {
return nil, fmt.Errorf("unsupported pocket-ic version, must be v3.x: %s", version)
}

pid := os.Getppid()
pid := os.Getpid()
cmdArgs := []string{"--pid", strconv.Itoa(pid)}
if config.ttl != nil {
cmdArgs = append(cmdArgs, "--ttl", strconv.Itoa(*config.ttl))
Expand Down

0 comments on commit 40dc28e

Please sign in to comment.