var outcome bool var server *ghttp.Server var things []string var lock *sync.Mutex BeforeEach(func() { things = []string{} server = ghttp.NewServer() codeLocation = codelocation.New(0) innerCodeLocation = codelocation.New(0) failer = Failer.New() lock = &sync.Mutex{} }) AfterEach(func() { server.Close() }) newNode := func(bodyA interface{}, bodyB interface{}) SuiteNode { return NewSynchronizedAfterSuiteNode(bodyA, bodyB, codeLocation, time.Millisecond, failer) } ranThing := func(thing string) { lock.Lock() defer lock.Unlock() things = append(things, thing) } thingsThatRan := func() []string { lock.Lock() defer lock.Unlock()