Pass test

This commit is contained in:
Bojan Serafimov
2022-09-12 15:28:00 -04:00
parent 646e0f3581
commit d296a76e3e
2 changed files with 11 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
use bytes::Bytes;
use std::{
fs::File,
fs::{create_dir_all, File},
io::{BufWriter, Write},
path::PathBuf,
};
@@ -17,6 +17,9 @@ impl Drop for Tracer {
impl Tracer {
pub fn new(path: PathBuf) -> Self {
let parent = path.parent().expect("failed to parse parent path");
create_dir_all(parent).expect("failed to create trace dir");
let file = File::create(path).expect("failed to create trace file");
Tracer {
writer: BufWriter::new(file),

View File

@@ -10,3 +10,10 @@ def test_trace_replay(neon_env_builder: NeonEnvBuilder):
"trace_read_requests": "true",
}
)
timeline = env.neon_cli.create_timeline("test_trace_replay", tenant_id=tenant)
pg = env.postgres.create_start("test_trace_replay", "main", tenant)
pg.safe_psql("select 1;")
trace_path = env.repo_dir / "traces" / str(tenant) / str(timeline) / str(timeline)
assert trace_path.exists()