Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(test): remove redundant failed-job queries in e2e test

Steven Enamakel7c7371c0a8de
diff --git a/src/openhuman/memory/sync_pipeline_e2e_tests.rs b/src/openhuman/memory/sync_pipeline_e2e_tests.rs
index 42ed9b52b4..18917d0916 100644
--- a/src/openhuman/memory/sync_pipeline_e2e_tests.rs
+++ b/src/openhuman/memory/sync_pipeline_e2e_tests.rs
@@ -50,6 +50,7 @@ fn test_config() -> (TempDir, Config) {
cfg.memory_tree.embedding_endpoint = None;
cfg.memory_tree.embedding_model = None;
cfg.memory_tree.embedding_strict = false;
+ cfg.memory.embedding_provider = "none".to_string();
(tmp, cfg)
}
@@ -314,24 +315,6 @@ async fn multi_batch_volume_builds_full_tree() {
let deadline = tokio::time::Instant::now() + std::time::Duration::from_secs(60);
let source_tree = loop {
drain_until_idle(&cfg).await.unwrap();
- if memory_queue::count_by_status(&cfg, JobStatus::Failed).unwrap() > 0 {
- let failed_jobs = tinymemory_core::store::chunks::with_connection(&cfg, |conn| {
- let mut stmt = conn.prepare(
- "SELECT kind, attempts, last_error FROM mem_tree_jobs \
- WHERE status = 'failed' ORDER BY created_at_ms",
- )?;
- let rows = stmt.query_map([], |row| {
- Ok((
- row.get::<_, String>(0)?,
- row.get::<_, i64>(1)?,
- row.get::<_, Option<String>>(2)?,
- ))
- })?;
- rows.collect::<Result<Vec<_>, _>>().map_err(Into::into)
- })
- .unwrap();
- panic!("memory jobs failed before the source tree sealed: {failed_jobs:?}");
- }
if let Some(tree) = tree_store::list_trees_by_kind(&cfg, TreeKind::Source)
.unwrap()
.into_iter()
@@ -345,27 +328,13 @@ async fn multi_batch_volume_builds_full_tree() {
.iter()
.find(|tree| tree.scope == source_id)
.map(|tree| tree_store::get_buffer(&cfg, &tree.id, 0).unwrap());
- let failed_jobs = tinymemory_core::store::chunks::with_connection(&cfg, |conn| {
- let mut stmt = conn.prepare(
- "SELECT kind, attempts, last_error FROM mem_tree_jobs \
- WHERE status = 'failed' ORDER BY created_at_ms",
- )?;
- let rows = stmt.query_map([], |row| {
- Ok((
- row.get::<_, String>(0)?,
- row.get::<_, i64>(1)?,
- row.get::<_, Option<String>>(2)?,
- ))
- })?;
- rows.collect::<Result<Vec<_>, _>>().map_err(Into::into)
- })
- .unwrap();
panic!(
"source tree did not seal before timeout: trees={trees:?}, buffer={buffer:?}, \
- ready={}, running={}, done={}, failed_jobs={failed_jobs:?}",
+ ready={}, running={}, done={}, failed={}",
memory_queue::count_by_status(&cfg, JobStatus::Ready).unwrap(),
memory_queue::count_by_status(&cfg, JobStatus::Running).unwrap(),
memory_queue::count_by_status(&cfg, JobStatus::Done).unwrap(),
+ memory_queue::count_by_status(&cfg, JobStatus::Failed).unwrap(),
);
}
tokio::time::sleep(std::time::Duration::from_millis(100)).await;