WIP checks
This commit is contained in:
@@ -28,15 +28,14 @@ fn events_plain_json_00() -> Result<(), Error> {
|
||||
series: None,
|
||||
},
|
||||
"1970-01-01T00:20:04.000Z",
|
||||
"1970-01-01T00:20:10.000Z",
|
||||
"1970-01-01T00:21:10.000Z",
|
||||
cluster,
|
||||
)
|
||||
.await?;
|
||||
info!("Receveided a response json value: {jsv:?}");
|
||||
let res: items_2::eventsdim0::EventsDim0CollectorOutput<i32> = serde_json::from_value(jsv)?;
|
||||
// inmem was meant just for functional test, ignores the requested time range
|
||||
assert_eq!(res.ts_anchor_sec(), 0);
|
||||
assert_eq!(res.len(), 60);
|
||||
assert_eq!(res.ts_anchor_sec(), 1204);
|
||||
assert_eq!(res.len(), 66);
|
||||
Ok(())
|
||||
};
|
||||
taskrun::run(fut)
|
||||
@@ -44,6 +43,11 @@ fn events_plain_json_00() -> Result<(), Error> {
|
||||
|
||||
#[test]
|
||||
fn events_plain_json_01() -> Result<(), Error> {
|
||||
// TODO
|
||||
// not worth to re-enable, getting rid of databuffer.
|
||||
if true {
|
||||
return Ok(());
|
||||
}
|
||||
let fut = async {
|
||||
let rh = require_test_hosts_running()?;
|
||||
let cluster = &rh.cluster;
|
||||
@@ -58,7 +62,6 @@ fn events_plain_json_01() -> Result<(), Error> {
|
||||
cluster,
|
||||
)
|
||||
.await?;
|
||||
info!("Receveided a response json value: {jsv:?}");
|
||||
let res: items_2::eventsdim0::EventsDim0CollectorOutput<i32> = serde_json::from_value(jsv)?;
|
||||
assert_eq!(res.ts_anchor_sec(), 1210);
|
||||
assert_eq!(res.pulse_anchor(), 2420);
|
||||
@@ -129,10 +132,10 @@ async fn events_plain_json(
|
||||
let s = String::from_utf8_lossy(&buf);
|
||||
let res: JsonValue = serde_json::from_str(&s)?;
|
||||
let pretty = serde_json::to_string_pretty(&res)?;
|
||||
trace!("{pretty}");
|
||||
info!("{pretty}");
|
||||
let t2 = chrono::Utc::now();
|
||||
let ms = t2.signed_duration_since(t1).num_milliseconds() as u64;
|
||||
// TODO add timeout
|
||||
debug!("time {} ms", ms);
|
||||
info!("time {} ms", ms);
|
||||
Ok(res)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user