You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: source_finished.rs
    path of file: ./repos/vector/src/topology/test
    
    the code of the file until where you have to start completion: use tokio::time::{timeout, Duration};
use vector_lib::codecs::{encoding::FramingConfig, TextSerializerConfig};

use crate::{
    config::Config,
    sinks::console::{ConsoleSinkConfig, Target},
    sources::demo_logs::DemoLogsConfig,
    test_util::{start_topology, trace_init},
};

#[tokio::test]
async fn sources_finished() {
    trace_init();

    let mut old_config = Config::builder();
    let demo_logs =
        DemoLogsConfig::repeat(vec!["text".to_owned()], 1, Duration::from_secs(0), None);
    old_config.add_sour
    
async fn sources_finished() {
    trace_init();

    let mut old_config = Config::builder();
    let demo_logs =
        DemoLogsConfig::repeat(vec!["text".to_owned()], 1, Duration::from_secs(0), None);
    old_config.add_source("in", demo_logs);
    old_config.add_sink(
        "out",
        &["in"],
        ConsoleSinkConfig {
            target: Target::Stdout,
            encoding: (None::<FramingConfig>, TextSerializerConfig::default()).into(),
            acknowledgements: Default::default(),
        },
    );

    let (topology, _) = start_topology(old_config.build().unwrap(), false).await;

    timeout(Duration::from_secs(2), topology.sources_finished())
        .await
        .unwrap();
}