This commit is contained in:
Dominik Werder
2021-06-14 23:10:14 +02:00
parent bb6d853b78
commit bebce14f56
9 changed files with 881 additions and 67 deletions

View File

@@ -21,6 +21,7 @@ async fn get_binned_json_0_inner() -> Result<(), Error> {
"1970-01-01T00:20:10.000Z",
"1970-01-01T01:20:30.000Z",
10,
AggKind::DimXBins1,
cluster,
13,
true,
@@ -41,6 +42,7 @@ async fn get_binned_json_1_inner() -> Result<(), Error> {
"1970-01-01T00:20:10.000Z",
"1970-01-01T01:20:45.000Z",
10,
AggKind::DimXBins1,
cluster,
13,
true,
@@ -48,17 +50,38 @@ async fn get_binned_json_1_inner() -> Result<(), Error> {
.await
}
#[test]
fn get_binned_json_2() {
taskrun::run(get_binned_json_2_inner()).unwrap();
}
async fn get_binned_json_2_inner() -> Result<(), Error> {
let rh = require_test_hosts_running()?;
let cluster = &rh.cluster;
get_binned_json_common(
"wave-f64-be-n21",
"1970-01-01T00:20:10.000Z",
"1970-01-01T02:20:10.000Z",
2,
AggKind::DimXBinsN(0),
cluster,
2,
true,
)
.await
}
async fn get_binned_json_common(
channel_name: &str,
beg_date: &str,
end_date: &str,
bin_count: u32,
agg_kind: AggKind,
cluster: &Cluster,
expect_bin_count: u32,
expect_finalised_range: bool,
) -> Result<(), Error> {
let t1 = Utc::now();
let agg_kind = AggKind::DimXBins1;
let node0 = &cluster.nodes[0];
let beg_date: DateTime<Utc> = beg_date.parse()?;
let end_date: DateTime<Utc> = end_date.parse()?;