<commit_before>#!/bin/bash
set -e
# a helper script to run tests in the appropriate directories

for dir in nsqd util/pqueue; do
    echo "testing $dir"
    pushd $dir >/dev/null
    go test -test.v -timeout 2s
    popd >/dev/null
done

pushd nsqd >/dev/null
go build
rm -f *.dat
./nsqd --data-path=/tmp >/dev/null 2>&1 &
PID=$!

cleanup() {
    kill -s TERM $PID
}

trap cleanup INT TERM EXIT

popd >/dev/null
pushd nsq >/dev/null
echo "testing nsq"
go test -v -timeout 2s
popd >/dev/null

# no tests, but a build is something
<commit_msg>bump test timeout to 5s (its aggregate)<commit_after>#!/bin/bash
set -e
# a helper script to run tests in the appropriate directories

for dir in nsqd util/pqueue; do
    echo "testing $dir"
    pushd $dir >/dev/null
    go test -test.v -timeout 5s
    popd >/dev/null
done

pushd nsqd >/dev/null
go build
rm -f *.dat
./nsqd --data-path=/tmp >/dev/null 2>&1 &
PID=$!

cleanup() {
    kill -s TERM $PID
}

trap cleanup INT TERM EXIT

popd >/dev/null
pushd nsq >/dev/null
echo "testing nsq"
go test -v -timeout 5s
popd >/dev/null

# no tests, but a build is something

{'fraction_non_alphanumeric': 0.12296564195298372, 'fraction_numerical': 0.0081374321880651, 'mean_word_length': 2.830449826989619, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, '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': '4562691', 'n_tokens_mistral': 458, 'n_tokens_neox': 431, 'n_words': 162}