Skip to content

Commit 1e41ce3

Browse files
committed
Remove commented lines
1 parent a025ced commit 1e41ce3

1 file changed

Lines changed: 0 additions & 69 deletions

File tree

crates/fluxqueue-worker/src/worker.rs

Lines changed: 0 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -334,81 +334,12 @@ mod tests {
334334
use crate::logger::TestWriter;
335335
use std::sync::{Arc, Mutex};
336336

337-
// #[test]
338-
// fn test_path_to_module_path() -> Result<()> {
339-
// let current_dir = Path::new("project");
340-
// let tasks_path = Path::new("../project/tasks.py");
341-
// let normalized_path = normalize_path(tasks_path);
342-
// let module_path = path_to_module_path(current_dir, &normalized_path);
343-
// let expected_path = Path::new("project/tasks.py");
344-
345-
// assert_eq!(normalized_path, expected_path);
346-
// assert_eq!(module_path, Some("tasks".to_string()));
347-
348-
// Ok(())
349-
// }
350-
351337
fn get_test_module_path(filename: &str) -> String {
352338
let current_dir = std::env::current_dir().unwrap();
353339
let test_module_path = current_dir.join("tests").join(filename);
354340
test_module_path.to_str().unwrap().to_string()
355341
}
356342

357-
// #[test]
358-
// fn test_get_task_functions_valid_module() -> Result<()> {
359-
// let module_path_str = get_test_module_path("test_tasks_module.py");
360-
// let functions = get_registry(&module_path_str, "default")?;
361-
362-
// assert_eq!(functions.len(), 3);
363-
364-
// let task_names: Vec<String> = functions.iter().map(|(name, _)| name.clone()).collect();
365-
// assert!(task_names.contains(&"task-1".to_string()));
366-
// assert!(task_names.contains(&"task-2".to_string()));
367-
// assert!(task_names.contains(&"async-task".to_string()));
368-
369-
// assert!(!task_names.contains(&"high-priority-task".to_string()));
370-
371-
// Ok(())
372-
// }
373-
374-
// #[test]
375-
// fn test_get_task_functions_different_queue() -> Result<()> {
376-
// let module_path_str = get_test_module_path("test_tasks_module.py");
377-
// let functions = get_registry(&module_path_str, "high-priority")?;
378-
379-
// assert_eq!(functions.len(), 1);
380-
// assert_eq!(functions[0].0, "high-priority-task");
381-
382-
// Ok(())
383-
// }
384-
385-
// #[test]
386-
// fn test_get_task_functions_empty_module() -> Result<()> {
387-
// let module_path_str = get_test_module_path("test_tasks_empty.py");
388-
// let functions = get_registry(&module_path_str, "default")?;
389-
390-
// assert_eq!(functions.len(), 0);
391-
392-
// Ok(())
393-
// }
394-
395-
// #[test]
396-
// fn test_get_task_functions_duplicate_names() {
397-
// let module_path_str = get_test_module_path("test_tasks_duplicate.py");
398-
399-
// let result = get_registry(&module_path_str, "default");
400-
// assert!(result.is_err());
401-
402-
// let error_msg = result.unwrap_err().to_string();
403-
// assert!(error_msg.contains("duplicated") || error_msg.contains("duplicate"));
404-
// }
405-
406-
// #[test]
407-
// fn test_get_task_functions_invalid_path() {
408-
// let result = get_registry("nonexistent/path/to/module.py", "default");
409-
// assert!(result.is_err());
410-
// }
411-
412343
#[tokio::test]
413344
async fn test_run_task_with_sync_function() -> Result<()> {
414345
let dispatcher_pool = Arc::new(PythonDispatcher::new()?);

0 commit comments

Comments
 (0)