<commit_before>package rsync

import (
	"fmt"
	"os"
	"testing"
	"time"
)

func TestNormalHttpCopy(t *testing.T) {

	files := []string{
		os.Args[0], "http_server.go", "../scheduler/scheduler.go", "fetch_url.go",
	}

	rsyncServer, err := NewRsyncServer(files[0], files[1:])
	if err != nil {
		t.Fatalf("Failed to start local server: %v", err)
	}
	rsyncServer.Start()

	err = FetchFilesTo(fmt.Sprintf("localhost:%d", rsyncServer.Port), "/tmp")
	if err != nil {
		fmt.Printf("pausing localhost:%d\n", rsyncServer.Port)
		time.Sleep(time.Minute)
		t.Fatalf("Failed to download file: %v", err)
	}

	t.Logf("file downloading works ok.")
}
<commit_msg>fix tests<commit_after>package rsync

import (
	"fmt"
	"os"
	"testing"
	"time"
)

func TestNormalHttpCopy(t *testing.T) {

	files := []string{
		os.Args[0], "http_server.go", "../scheduler/scheduler.go", "fetch_url.go",
	}

	rsyncServer, err := NewRsyncServer(":0", files[0], files[1:])
	if err != nil {
		t.Fatalf("Failed to start local server: %v", err)
	}
	rsyncServer.Start()

	err = FetchFilesTo(fmt.Sprintf("localhost:%d", rsyncServer.Port), "/tmp")
	if err != nil {
		fmt.Printf("pausing localhost:%d\n", rsyncServer.Port)
		time.Sleep(time.Minute)
		t.Fatalf("Failed to download file: %v", err)
	}

	t.Logf("file downloading works ok.")
}

{'fraction_non_alphanumeric': 0.1873065015479876, 'fraction_numerical': 0.005417956656346749, 'mean_word_length': 4.410041841004184, 'pattern_counts': {'":': 1, '<': 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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3723564', 'n_tokens_mistral': 527, 'n_tokens_neox': 506, 'n_words': 106}