#!/bin/bash

# TODO: remove 'sleep' after FLASH-635 is addressed
function cmd_ti_ci_tpch_diff()
{
	local file="${1}"
	local args="${2}"
	shift 6

	local ti="${integrated}/ops/ti.sh"

	"${ti}" -k "${args}" "${file}" stop : fstop : up : sleep 5

	"${ti}" -k "${args}" "${file}" mysql/nogc : syncing/speed_up : tpch/load 0.1 all : sleep 5

	"${ti}" -k "${args}" "${file}" tpch/diff tpch_0_1

	"${ti}" -k "${args}" "${file}" fstop : up
}

set -euo pipefail
cmd_ti_ci_tpch_diff "${@}"
