()
| 343 | |
| 344 | #[tokio::test] |
| 345 | pub async fn test_encode_timeout() { |
| 346 | let encoder = r#" |
| 347 | function encodeDownlink(input) { |
| 348 | while (true) { |
| 349 | |
| 350 | } |
| 351 | } |
| 352 | "# |
| 353 | .to_string(); |
| 354 | |
| 355 | let vars: HashMap<String, String> = HashMap::new(); |
| 356 | |
| 357 | let input = prost_types::Struct { |
| 358 | ..Default::default() |
| 359 | }; |
| 360 | |
| 361 | let out = encode(10, &vars, &encoder, &input).await; |
| 362 | assert!(out.is_err()); |
| 363 | } |
| 364 | |
| 365 | #[tokio::test] |
| 366 | pub async fn test_encode_error() { |