<commit_before>#!/bin/sh

[ $1 -eq 0 ] || exit 0

repl_wait()
{
	ios=$1
	fn=$2

	while msctl -H repl-status $fn | \
	    grep -A1 $ios | tail -1 | grep q; do
		sleep 1
	done
}

fn=t000

dd if=$RANDOM_DATA of=$fn bs=131072

msctl repl-add:io0@SITE0,io1@SITE0:* $fn

msctl repl-status $fn

repl_wait io0@SITE0 $fn
repl_wait io1@SITE0 $fn

msctl repl-status $fn<commit_msg>make the replication test a little more interesting<commit_after>#!/bin/sh

[ $1 -eq 0 ] || exit 0

repl_wait()
{
	ios=$1
	fn=$2

	while msctl -H repl-status $fn | \
	    grep -A1 $ios | tail -1 | grep q; do
		sleep 1
	done
}

fn=t000

dd if=$RANDOM_DATA of=$fn bs=131072

cksum=$(md5sum $fn)

msctl repl-add:io0@SITE0,io1@SITE0:* $fn

repl_wait io0@SITE0 $fn
repl_wait io1@SITE0 $fn

msctl repl-remove:io0@SITE0:* $fn

echo $cksum | md5sum -c

msctl repl-add:io0@SITE0:* $fn
msctl repl-remove:io1@SITE0:* $fn

echo $cksum | md5sum -c

{'fraction_non_alphanumeric': 0.14696132596685083, 'fraction_numerical': 0.06519337016574586, 'mean_word_length': 3.5757575757575757, 'pattern_counts': {'":': 0, '<': 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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3614446', 'n_tokens_mistral': 459, 'n_tokens_neox': 431, 'n_words': 109}