Fix batch id detection

Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
This commit is contained in:
Martin Tzvetanov Grigorov
2025-07-11 10:24:25 +03:00
parent 3bef4f4413
commit eb6ad3ef9c

View File

@ -346,6 +346,7 @@ async fn test_summarized_document_addition_or_update() {
".stats.writeChannelCongestion" => "[writeChannelCongestion]",
".stats.internalDatabaseSizes" => "[internalDatabaseSizes]",
".stats.indexUids" => r#"{"[uuid]": 1}"#,
".batchCreationComplete" => "batched all enqueued tasks",
},
@r###"
{
@ -438,6 +439,7 @@ async fn test_summarized_delete_documents_by_batch() {
".stats.writeChannelCongestion" => "[writeChannelCongestion]",
".stats.internalDatabaseSizes" => "[internalDatabaseSizes]",
".stats.indexUids" => r#"{"[uuid]": 1}"#,
".batchCreationComplete" => "batched all enqueued tasks",
},
@r###"
{
@ -1127,8 +1129,8 @@ async fn test_summarized_index_swap() {
{ "indexes": ["doggos", "cattos"] }
]))
.await;
server.wait_task(task.uid()).await.failed();
let (batch, _) = server.get_batch(task.uid() as u32).await;
let task = server.wait_task(task.uid()).await.failed();
let (batch, _) = server.get_batch(task.batch_uid()).await;
assert_json_snapshot!(batch,
{
".uid" => "[uid]",
@ -1181,8 +1183,8 @@ async fn test_summarized_index_swap() {
{ "indexes": [doggos_index.uid, cattos_index.uid] }
]))
.await;
server.wait_task(task.uid()).await.succeeded();
let (batch, _) = server.get_batch(task.uid() as u32).await;
let task = server.wait_task(task.uid()).await.succeeded();
let (batch, _) = server.get_batch(task.batch_uid()).await;
assert_json_snapshot!(batch,
{
".uid" => "[uid]",