Skip to content

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

test(storage): shrink over-frame blob and speed up probe fixture

Steven Enamakeld3bb749ca4e4
diff --git a/crates/openhuman-core/src/modules/storage_host_cdylib_tests.rs b/crates/openhuman-core/src/modules/storage_host_cdylib_tests.rs
index 7d492a3232..03ed8505a9 100644
--- a/crates/openhuman-core/src/modules/storage_host_cdylib_tests.rs
+++ b/crates/openhuman-core/src/modules/storage_host_cdylib_tests.rs
@@ -488,10 +488,10 @@ async fn a_blob_over_the_frame_cannot_go_inline() {
.unwrap();
assert!(small.get("ok").is_some(), "a small inline blob works: {small}");
// Past the contract's inline cap (1 MiB) the server refuses the body, and
- // past the 16 MiB frame (8 MiB of bytes is already more than that as JSON)
+ // past the 16 MiB frame (4.5 MB of 0xFF bytes is already 18 MB as JSON)
// the bus never delivers it. Either way it must fail closed and store
// nothing; the way for a big body is `PutStream` (#7781).
- for (len, name) in [(2usize * 1024 * 1024, "over-cap"), (9_000_000, "over-frame")] {
+ for (len, name) in [(2usize * 1024 * 1024, "over-cap"), (4_500_000, "over-frame")] {
let key = format!("tinyjuice_ccr/{name}");
eprintln!("[cdylib-test] inline blob {name} ({len} bytes)");
let started = std::time::Instant::now();
diff --git a/tests/fixtures/storage_probe_module/Cargo.toml b/tests/fixtures/storage_probe_module/Cargo.toml
index 5607715d28..02d39e8396 100644
--- a/tests/fixtures/storage_probe_module/Cargo.toml
+++ b/tests/fixtures/storage_probe_module/Cargo.toml
@@ -25,3 +25,4 @@ tinybus-module = { path = "../../../vendor/tinybus/crates/tinybus-module" }
[profile.dev]
debug = false
+opt-level = 2
diff --git a/tests/fixtures/storage_probe_module/src/lib.rs b/tests/fixtures/storage_probe_module/src/lib.rs
index e7ecab6ae2..6ecbfc211f 100644
--- a/tests/fixtures/storage_probe_module/src/lib.rs
+++ b/tests/fixtures/storage_probe_module/src/lib.rs
@@ -39,7 +39,7 @@ impl Interface for Probe {
(
"Blobs".into(),
"Put".into(),
- json!({ "key": key, "bytes": vec![7u8; len] }),
+ json!({ "key": key, "bytes": vec![255u8; len] }),
false,
)
} else {