lifecycle.rs 409 Bytes
Newer Older
1
2
3
// SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

4
5
6
use anyhow::Result;

use dynamo_runtime::{Runtime, worker::Worker};
Ryan Olson's avatar
Ryan Olson committed
7
8
9
10
11
12
13
14
15
16

async fn hello_world(_runtime: Runtime) -> Result<()> {
    Ok(())
}

#[test]
fn test_lifecycle() {
    let worker = Worker::from_settings().unwrap();
    worker.execute(hello_world).unwrap();
}