Connect via pagestream

This commit is contained in:
Bojan Serafimov
2022-09-13 14:09:15 -04:00
parent 0d6d8fefd3
commit ecbda94790
4 changed files with 100 additions and 34 deletions

View File

@@ -1642,13 +1642,15 @@ class ReplayBin:
traces_dir: str
def replay_all(self) -> str:
def replay_all(self, pageserver_connstr):
replay_binpath = os.path.join(str(neon_binpath), "replay")
args = [
replay_binpath,
self.traces_dir,
pageserver_connstr,
]
return subprocess.run(args, capture_output=True).stdout.decode("UTF-8").strip()
# return subprocess.run(args, capture_output=True).stdout.decode("UTF-8").strip()
subprocess.run(args)
@pytest.fixture(scope="function")

View File

@@ -18,5 +18,7 @@ def test_trace_replay(neon_env_builder: NeonEnvBuilder, replay_bin: ReplayBin):
trace_path = env.repo_dir / "traces" / str(tenant) / str(timeline) / str(timeline)
assert trace_path.exists()
output = replay_bin.replay_all()
print("replaying")
ps_connstr = env.pageserver.connstr().replace("'", "\\'")
output = replay_bin.replay_all(ps_connstr)
print(output)