<commit_before>package latency_test

import (
	"fmt"
	"io/ioutil"
	"os/exec"
	"path/filepath"
	"strconv"

	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
	"github.com/onsi/gomega/gbytes"
	"github.com/onsi/gomega/gexec"
	"github.com/pivotal-cf/cf-redis-broker/integration"
	"github.com/pivotal-cf/redis-backups/integration/helpers"
)

var session *gexec.Session
var cmd *exec.Cmd

var _ = Describe("Latency", func() {
	AfterEach(func() {
		session.Terminate()
		Eventually(session).Should(gexec.Exit())
	})

	JustBeforeEach(func() {
		var err error
		session, err = gexec.Start(cmd, GinkgoWriter, GinkgoWriter)
		Expect(err).ToNot(HaveOccurred())
	})

	Context("when no redis config file is provided", func() {
		BeforeEach(func() {
			cmd = exec.Command(latencyExecutablePath)
		})

		It("Exits with status 2", func() {<commit_msg>Use correct helpers package<commit_after>package latency_test

import (
	"fmt"
	"io/ioutil"
	"os/exec"
	"path/filepath"
	"strconv"

	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
	"github.com/onsi/gomega/gbytes"
	"github.com/onsi/gomega/gexec"
	"github.com/pivotal-cf/cf-redis-broker/integration"
	"github.com/pivotal-cf/cf-redis-broker/integration/helpers"
)

var session *gexec.Session
var cmd *exec.Cmd

var _ = Describe("Latency", func() {
	AfterEach(func() {
		session.Terminate()
		Eventually(session).Should(gexec.Exit())
	})

	JustBeforeEach(func() {
		var err error
		session, err = gexec.Start(cmd, GinkgoWriter, GinkgoWriter)
		Expect(err).ToNot(HaveOccurred())
	})

	Context("when no redis config file is provided", func() {
		BeforeEach(func() {
			cmd = exec.Command(latencyExecutablePath)
		})

		It("Exits with status 2", func() {
{'fraction_non_alphanumeric': 0.1576151121605667, 'fraction_numerical': 0.0011806375442739079, 'mean_word_length': 4.521172638436482, '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': '2958769', 'n_tokens_mistral': 701, 'n_tokens_neox': 664, 'n_words': 107}