refactor(tvix/castore): use DuplexStream instead of unix socket
We can use DuplexStream to create to bidirectional pairs, which avoids manually waiting for unix sockets to pop up and connect, and creating temporary directoires to create the unix sockets in. Turns out, we also don't actually need to spawn the server in a separate runtime, it works just fine these days. This might be due to all the sync barriers in between being gone. Change-Id: I6b79823bc6209cbcb343b7a498c64a2ba6e0aee7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9562 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
This commit is contained in:
parent
d1adefc9f9
commit
b172c804b0
3 changed files with 47 additions and 76 deletions
|
|
@ -339,7 +339,6 @@ impl DirectoryPutter for GRPCPutter {
|
|||
mod tests {
|
||||
use core::time;
|
||||
use futures::StreamExt;
|
||||
use tempfile::TempDir;
|
||||
|
||||
use crate::{
|
||||
directoryservice::DirectoryService,
|
||||
|
|
@ -349,11 +348,9 @@ mod tests {
|
|||
|
||||
#[tokio::test]
|
||||
async fn test() {
|
||||
let tempdir = TempDir::new().expect("must succeed");
|
||||
// create the GrpcDirectoryService
|
||||
let directory_service = super::GRPCDirectoryService::from_client(
|
||||
gen_directorysvc_grpc_client(tempdir.path()).await,
|
||||
);
|
||||
let directory_service =
|
||||
super::GRPCDirectoryService::from_client(gen_directorysvc_grpc_client().await);
|
||||
|
||||
// try to get DIRECTORY_A should return Ok(None)
|
||||
assert_eq!(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue