@@ -281,7 +281,7 @@ pub async fn get_stats(
281
281
// For query mode, if the stream not found in memory map,
282
282
//check if it exists in the storage
283
283
//create stream and schema from storage
284
- if cfg ! ( not ( test ) ) && PARSEABLE . options . mode == Mode :: Query {
284
+ if PARSEABLE . options . mode == Mode :: Query {
285
285
match PARSEABLE
286
286
. create_stream_and_schema_from_storage ( & stream_name)
287
287
. await
@@ -790,12 +790,8 @@ pub mod error {
790
790
791
791
#[ cfg( test) ]
792
792
mod tests {
793
- use crate :: handlers:: http:: logstream:: error:: StreamError ;
794
- use crate :: handlers:: http:: logstream:: get_stats;
795
793
use crate :: handlers:: http:: modal:: utils:: logstream_utils:: PutStreamHeaders ;
796
794
use actix_web:: test:: TestRequest ;
797
- use actix_web:: web;
798
- use anyhow:: bail;
799
795
800
796
// TODO: Fix this test with routes
801
797
// #[actix_web::test]
@@ -805,15 +801,15 @@ mod tests {
805
801
// let _ = get_stats(req).await;
806
802
// }
807
803
808
- #[ actix_web:: test]
809
- async fn get_stats_stream_not_found_error_for_unknown_logstream ( ) -> anyhow:: Result < ( ) > {
810
- let req = TestRequest :: default ( ) . to_http_request ( ) ;
804
+ // #[actix_web::test]
805
+ // async fn get_stats_stream_not_found_error_for_unknown_logstream() -> anyhow::Result<()> {
806
+ // let req = TestRequest::default().to_http_request();
811
807
812
- match get_stats ( req, web:: Path :: from ( "test" . to_string ( ) ) ) . await {
813
- Err ( StreamError :: StreamNotFound ( _) ) => Ok ( ( ) ) ,
814
- _ => bail ! ( "expected StreamNotFound error" ) ,
815
- }
816
- }
808
+ // match get_stats(req, web::Path::from("test".to_string())).await {
809
+ // Err(StreamError::StreamNotFound(_)) => Ok(()),
810
+ // _ => bail!("expected StreamNotFound error"),
811
+ // }
812
+ // }
817
813
818
814
#[ actix_web:: test]
819
815
async fn header_without_log_source ( ) {
0 commit comments