Files
openobserve/tests
Ashish Kolhe 65f5ab44e3 fix: failing streaming tests (#8037)
### **PR Type**
Tests, Bug fix


___

### **Description**
Fix streaming tests' total aggregation logic
Track latest total instead of summing
Update debug logs to reflect final total
Adjust combined metadata to use final total


___

### Diagram Walkthrough


```mermaid
flowchart LR
  Parse["Parse streaming metadata"] -- "extract results.total" --> Track["Track latest total"]
  Track -- "set final_total" --> Combine["Combine first metadata with final_total"]
  Hits["Collect hits events"] -- "aggregate all hits" --> Combine
```



<details> <summary><h3> File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Tests</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>test_streaming.py</strong><dd><code>Use latest total
for streaming metadata</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></summary>
<hr>

tests/api-testing/tests/test_streaming.py

<ul><li>Replace summed <code>total_sum</code> with
<code>final_total</code><br> <li> Update debug prints to reference final
total<br> <li> Set combined metadata <code>results.total</code> to
latest total<br> <li> Clarify comments for streaming semantics</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8037/files#diff-f15e9b733130f72112380fda658264545435fbf956b08869b0ad5a9435d222f7">+8/-8</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

</details>

___
2025-08-18 22:41:45 +05:30
..
2024-09-22 17:57:47 +08:00