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: compaction_test.rs
    path of file: ./repos/incubator-horaedb/src/analytic_engine/src/tests
    
    the code of the file until where you have to start completion: // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional informati
    
fn test_table_compact_current_segment<T: EngineBuildContext>(engine_context: T) {
    let env = TestEnv::builder().build();
    let mut test_ctx = env.new_context(engine_context);

    env.block_on(async {
        test_ctx.open().await;

        let compact_test_table1 = "compact_test_table1";
        let fixed_schema_table = test_ctx
            .create_fixed_schema_table(compact_test_table1)
            .await;
        let default_opts = SizeTieredCompactionOptions::default();

        let mut expect_rows = Vec::new();

        let start_ms = test_ctx.start_ms();
        // Write max_threshold*2 sst to ensure level0->level1, level1->level1 compaction
        // will be triggered.
        for offset in 0..default_opts.max_threshold as i64 * 2 {
            let rows = [
                (
                    "key1",
                    Timestamp::new(start_ms + offset),
                    "tag1-1",
                    11.0,
                    110.0,
                    "tag2-1",
                ),
                (
                    "key2",
                    Timestamp::new(start_ms + offset),
                    "tag1-2",
                    12.0,
                    110.0,
                    "tag2-2",
                ),
            ];
            expect_rows.extend_from_slice(&rows);
            let row_group = fixed_schema_table.rows_to_row_group(&rows);

            test_ctx
                .write_to_table(compact_test_table1, row_group)
                .await;

            // Flush table and generate sst.
            test_ctx
                .flush_table_with_request(compact_test_table1, FlushRequest { sync: true })
                .await;
        }

        expect_rows.sort_unstable_by_key(|row_tuple| (row_tuple.0, row_tuple.1));

        util::check_read(
            &test_ctx,
            &fixed_schema_table,
            "Test read after flush",
            compact_test_table1,
            &expect_rows,
        )
        .await;

        test_util::init_log_for_test();

        // Trigger a compaction.
        test_ctx.compact_table(compact_test_table1).await;

        // Check read after compaction.
        util::check_read(
            &test_ctx,
            &fixed_schema_table,
            "Test read after compaction",
            compact_test_table1,
            &expect_rows,
        )
        .await;
    });
}