Fix tests
This commit is contained in:
@@ -14,16 +14,7 @@ pub async fn channel_config(range: NanoRange, channel: Channel, ncc: &NodeConfig
|
||||
if channel.backend() == TEST_BACKEND {
|
||||
let backend = channel.backend().into();
|
||||
// TODO the series-ids here are just random. Need to integrate with better test setup.
|
||||
let ret = if channel.name() == "inmem-d0-i32" {
|
||||
let ret = ChConf {
|
||||
backend,
|
||||
series: Some(1),
|
||||
name: channel.name().into(),
|
||||
scalar_type: ScalarType::I32,
|
||||
shape: Shape::Scalar,
|
||||
};
|
||||
Ok(ret)
|
||||
} else if channel.name() == "scalar-i32-be" {
|
||||
let ret = if channel.name() == "scalar-i32-be" {
|
||||
let ret = ChConf {
|
||||
backend,
|
||||
series: Some(2),
|
||||
|
||||
+2
-5
@@ -74,9 +74,8 @@ async fn make_channel_events_stream_data(
|
||||
chconf: ChConf,
|
||||
node_config: &NodeConfigCached,
|
||||
) -> Result<Pin<Box<dyn Stream<Item = Sitemty<ChannelEvents>> + Send>>, Error> {
|
||||
info!("nodenet::conn::make_channel_events_stream");
|
||||
if evq.channel().backend() == TEST_BACKEND {
|
||||
warn!("GENERATE INMEM TEST DATA");
|
||||
debug!("use test backend data {}", TEST_BACKEND);
|
||||
let node_count = node_config.node_config.cluster.nodes.len() as u64;
|
||||
let node_ix = node_config.ix as u64;
|
||||
let chn = evq.channel().name();
|
||||
@@ -162,7 +161,6 @@ async fn make_channel_events_stream(
|
||||
}
|
||||
|
||||
async fn events_get_input_frames(netin: OwnedReadHalf) -> Result<Vec<InMemoryFrame>, Error> {
|
||||
warn!("fix magic inmem_bufcap option");
|
||||
let perf_opts = PerfOpts::default();
|
||||
let mut h = InMemoryFrameAsyncReadStream::new(netin, perf_opts.inmem_bufcap);
|
||||
let mut frames = Vec::new();
|
||||
@@ -223,7 +221,7 @@ async fn events_parse_input_query(
|
||||
return Err(e);
|
||||
}
|
||||
};
|
||||
info!("events_conn_handler_inner_try evq {:?}", evq);
|
||||
debug!("events_parse_input_query {:?}", evq);
|
||||
let chconf = crate::channelconfig::channel_config(evq.range().try_into()?, evq.channel().clone(), ncc)
|
||||
.await
|
||||
.map_err(|e| Error::with_msg_no_trace(format!("{e:?}")))?;
|
||||
@@ -241,7 +239,6 @@ async fn events_conn_handler_inner_try(
|
||||
Ok(x) => x,
|
||||
Err(e) => return Err((e, netout).into()),
|
||||
};
|
||||
debug!("events_conn_handler input frames received");
|
||||
let (evq, chconf) = match events_parse_input_query(frames, node_config).await {
|
||||
Ok(x) => x,
|
||||
Err(e) => return Err((e, netout).into()),
|
||||
|
||||
Reference in New Issue
Block a user