test_smartreceive_function #1

Merged
ton merged 15 commits from test_smartreceive_function into main 2026-02-12 23:34:18 +00:00
2 changed files with 4 additions and 3 deletions
Showing only changes of commit ebe049624a - Show all commits

View File

@@ -191,7 +191,7 @@ function smartsend(
type = type, type = type,
transport = "direct", transport = "direct",
payload = payload_b64, payload = payload_b64,
metadata = Dict("content_length" => payload_size, "format" => "arrow_ipc_stream") metadata = Dict("dataname" => dataname, "content_length" => payload_size, "format" => "arrow_ipc_stream")
) )
msg_json = envelope_to_json(env) # Convert envelope to JSON msg_json = envelope_to_json(env) # Convert envelope to JSON

View File

@@ -71,10 +71,10 @@ function test_large_binary_receive()
result = NATSBridge.smartreceive(msg) result = NATSBridge.smartreceive(msg)
# Check transport type # Check transport type
if result.envelope.transport == "direct" if result.envelope.transport == "direct"
log_trace("Received direct transport with ---- bytes") log_trace("Received direct transport")
else else
# For link transport, result.data is the URL # For link transport, result.data is the URL
log_trace("Received link transport at ---") log_trace("Received link transport")
end end
# Verify the received data matches the original # Verify the received data matches the original
@@ -84,6 +84,7 @@ function test_large_binary_receive()
log_trace("Received $(file_size) bytes of binary data") log_trace("Received $(file_size) bytes of binary data")
# Save received data to a test file # Save received data to a test file
println("metadata ", result.envelope.metadata)
dataname = result.envelope.metadata["dataname"] dataname = result.envelope.metadata["dataname"]
if dataname != "NA" if dataname != "NA"
output_path = "./new_$dataname" output_path = "./new_$dataname"