redgold 0.1.21

p2p database / compute engine & portfolio target models
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

use std::thread::sleep;
use std::time::Duration;
use redgold::core::run_main::main_from_args;
use redgold::util::cli::args::RgArgs;
use redgold::util::runtimes::{build_simple_runtime};

#[test]
fn run_main() {

    // TODO: Change the runtime structure to implement the shutdowns directly inside, then pass
    // around the Arc reference externally for spawning.
    let rt = build_simple_runtime(1, "test_run_main");
    let args = RgArgs::default();
    rt.spawn_blocking(move || main_from_args(args));
    sleep(Duration::from_secs(10));
    rt.shutdown_timeout(Duration::from_secs(10));
}