<commit_before>// +build !race

package reactor

import (
	"testing"
	"time"

	"github.com/stretchr/testify/assert"
)

func TestRequestRenderTimeout(t *testing.T) {
	assert := assert.New(t)

	pool := NewPool(bundle)

	for i := 0; i < 10; i++ {
		req := &Request{
			Name: "Widget",
			Props: map[string]interface{}{
				"serial": "1",
			},
			Timeout: 10 * time.Nanosecond,
		}

		resp, err := pool.Render(req)
		assert.Nil(resp)
		assert.NotNil(err)
		if err != nil {
			assert.Contains(err.Error(), "timed out")
		}
	}
}<commit_msg>skip timeout test in CI<commit_after>// +build !race

package reactor

import (
	"os"
	"testing"
	"time"

	"github.com/stretchr/testify/assert"
)

func TestRequestRenderTimeout(t *testing.T) {
	if os.Getenv("CI") != "" {
		t.Skip()
	}

	assert := assert.New(t)

	pool := NewPool(bundle)

	for i := 0; i < 10; i++ {
		req := &Request{
			Name: "Widget",
			Props: map[string]interface{}{
				"serial": "1",
			},
			Timeout: 10 * time.Nanosecond,
		}

		resp, err := pool.Render(req)
		assert.Nil(resp)
		assert.NotNil(err)
		if err != nil {
			assert.Contains(err.Error(), "timed out")
		}
	}
}
{'fraction_non_alphanumeric': 0.1824623560673162, 'fraction_numerical': 0.010628875110717449, 'mean_word_length': 3.2641509433962264, 'pattern_counts': {'":': 2, '<': 5, '<?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': '1495957', 'n_tokens_mistral': 509, 'n_tokens_neox': 440, 'n_words': 96}