<commit_before>﻿using System;
using System.Linq;
using System.Reactive.Linq;
using System.Threading.Tasks;
using Xunit;

namespace Ocelog.Transport.Test
{
    public class TcpTransportTests
    {
        int _port;
        IObserver<FormattedLogEvent> _sender;

        public TcpTransportTests()
        {
            _port = 12345; // RandomPort();
        }

        [Fact]
        public async void should_send_content_to_tcp_endpoint()
        {
            using (var receiver = await TcpReceiver.Receive(_port))
            {
                _sender = CreateSender();
                _sender.OnNext(new FormattedLogEvent { Content = "Hello1" });
                await Task.Delay(100);
                
                Assert.Equal("Hello1", receiver.Lines.Single());<commit_msg>made test port random again<commit_after>﻿using System;
using System.Linq;
using System.Reactive.Linq;
using System.Threading.Tasks;
using Xunit;

namespace Ocelog.Transport.Test
{
    public class TcpTransportTests
    {
        int _port;
        IObserver<FormattedLogEvent> _sender;

        public TcpTransportTests()
        {
            _port = RandomPort();
        }

        [Fact]
        public async void should_send_content_to_tcp_endpoint()
        {
            using (var receiver = await TcpReceiver.Receive(_port))
            {
                _sender = CreateSender();
                _sender.OnNext(new FormattedLogEvent { Content = "Hello1" });
                await Task.Delay(100);
                
                Assert.Equal("Hello1", receiver.Lines.Single());
{'fraction_non_alphanumeric': 0.09085133418043202, 'fraction_numerical': 0.009529860228716646, 'mean_word_length': 1.9886148007590132, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2643710', 'n_tokens_mistral': 437, 'n_tokens_neox': 422, 'n_words': 90}