<commit_before>package graylog

import (
	"bytes"
	"compress/zlib"
	"encoding/json"
	"io"
	"net"
	"sync"
	"testing"

	"github.com/influxdata/telegraf/testutil"
	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/require"
)

func TestWriteDefault(t *testing.T) {
	scenarioUDP(t, "127.0.0.1:12201")
}

func TestWriteUDP(t *testing.T) {
	scenarioUDP(t, "udp://127.0.0.1:12201")
}

func TestWriteTCP(t *testing.T) {
	scenarioTCP(t, "tcp://127.0.0.1:12201")
}

func scenarioUDP(t *testing.T, server string) {
	var wg sync.WaitGroup
	var wg2 sync.WaitGroup
	wg.Add(1)
	wg2.Add(1)<commit_msg>fix: mute graylog UDP/TCP tests by marking them as integration (#9881)<commit_after>package graylog

import (
	"bytes"
	"compress/zlib"
	"encoding/json"
	"io"
	"net"
	"sync"
	"testing"

	"github.com/influxdata/telegraf/testutil"
	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/require"
)

func TestWriteDefault(t *testing.T) {
	if testing.Short() {
		t.Skip("skipping test in short mode.")
	}

	scenarioUDP(t, "127.0.0.1:12201")
}

func TestWriteUDP(t *testing.T) {
	if testing.Short() {
		t.Skip("skipping test in short mode.")
	}

	scenarioUDP(t, "udp://127.0.0.1:12201")
}

func TestWriteTCP(t *testing.T) {
	if testing.Short() {
		t.Skip("skipping test in short mode.")
	}

	scenarioTCP(t, "tcp://127.0.0.1:12201")
}

func scenarioUDP(t *testing.T, server string) {
	var wg sync.WaitGroup
	var wg2 sync.WaitGroup
	wg.Add(1)
	wg2.Add(1)
{'fraction_non_alphanumeric': 0.1684931506849315, 'fraction_numerical': 0.05342465753424658, 'mean_word_length': 4.274368231046932, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 6, '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': '7306469', 'n_tokens_mistral': 686, 'n_tokens_neox': 639, 'n_words': 112}