<commit_before>package exec_test

import (
	"context"
	"errors"
	"fmt"
	"sync"
	"time"

	. "github.com/concourse/concourse/atc/exec"
	"github.com/concourse/concourse/atc/exec/build"
	"github.com/concourse/concourse/atc/exec/execfakes"
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
)

var _ = Describe("Parallel", func() {
	var (
		ctx    context.Context
		cancel func()

		fakeStepA *execfakes.FakeStep
		fakeStepB *execfakes.FakeStep
		fakeSteps []Step

		repo  *build.Repository
		state *execfakes.FakeRunState

		step    Step
		stepErr error
	)

	BeforeEach(func() {
		ctx, cancel = context.WithCancel(context.Background())

		fakeStepA = new(execfakes.FakeStep)
		fakeStepB = new(execfakes.FakeStep)
		fakeSteps = []Step{fakeStepA, fakeStepB}

		step = InParallel(fakeSteps, len(fakeSteps), false)

		repo = build.NewRepository()
		state = new(execfakes.FakeRunState)
		state.ArtifactsReturns(repo)
	})

	AfterEach(func() {
		cancel()
	})

	JustBeforeEach(func() {
		stepErr = step.Run(ctx, state)
	})<commit_msg>fix atc/exec/in_parallel_test.go<commit_after>package exec_test

import (
	"context"
	"errors"
	"fmt"
	"sync"
	"time"

	. "github.com/concourse/concourse/atc/exec"
	"github.com/concourse/concourse/atc/exec/build"
	"github.com/concourse/concourse/atc/exec/execfakes"
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
)

var _ = Describe("Parallel", func() {
	var (
		ctx    context.Context
		cancel func()

		fakeStepA *execfakes.FakeStep
		fakeStepB *execfakes.FakeStep
		fakeSteps []Step

		repo  *build.Repository
		state *execfakes.FakeRunState

		step    Step
		stepErr error
	)

	BeforeEach(func() {
		ctx, cancel = context.WithCancel(context.Background())

		fakeStepA = new(execfakes.FakeStep)
		fakeStepB = new(execfakes.FakeStep)
		fakeSteps = []Step{fakeStepA, fakeStepB}

		step = InParallel(fakeSteps, len(fakeSteps), false)

		repo = build.NewRepository()
		state = new(execfakes.FakeRunState)
		state.ArtifactRepositoryReturns(repo)
	})

	AfterEach(func() {
		cancel()
	})

	JustBeforeEach(func() {
		stepErr = step.Run(ctx, state)
	})
{'fraction_non_alphanumeric': 0.13496637848222862, 'fraction_numerical': 0.0, 'mean_word_length': 4.194513715710723, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4597936', 'n_tokens_mistral': 850, 'n_tokens_neox': 797, 'n_words': 123}