Skip to content

Commit

Permalink
Batch vc send error test (#2671)
Browse files Browse the repository at this point in the history
* test run

* revert changes

---------

Co-authored-by: Yang <yang@trustcomputing.de>
Co-authored-by: Yang <yang@litentry.com>
  • Loading branch information
3 people committed Apr 17, 2024
1 parent f53fb13 commit 61f7441
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions local-setup/launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def setup_worker(work_dir: str, source_dir: str, worker_bin: str, std_err: Union

def run_worker(id, worker_dir, worker_bin, flags, subcommand_flags, log_config_path):
log = open(f"{log_dir}/worker-{id}.log", "w+")

w = setup_worker(f"tmp/w-{id}", worker_dir + "/bin", worker_bin, log, log_config_path)

print(f"Starting worker {id} in background")
Expand Down Expand Up @@ -262,7 +262,7 @@ def main(processes, worker, workers_number, parachain_type, log_config_path, off
print()
# Wait a bit for worker to start up.
sleep(5)

idx = 0
if "-h" in flags:
idx = flags.index("-h") + 1
Expand Down
12 changes: 11 additions & 1 deletion tee-worker/enclave-runtime/src/initialization/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,17 @@ fn run_vc_issuance() -> Result<(), Error> {
);
let extrinsic_factory = get_extrinsic_factory_from_integritee_solo_or_parachain()?;
let node_metadata_repo = get_node_metadata_repository_from_integritee_solo_or_parachain()?;
run_vc_handler_runner(Arc::new(stf_task_context), extrinsic_factory, node_metadata_repo);

let vc_handler = std::thread::spawn(move || {
error!("*** testing vc task start");
run_vc_handler_runner(Arc::new(stf_task_context), extrinsic_factory, node_metadata_repo);
error!("*** testing vc task finish");
});
match vc_handler.join() {
Ok(v) => error!("Joined vc_handler OK: {:?}", v),
Err(e) => error!("Joined vc_handler Err: {:?}", e),
}

Ok(())
}

Expand Down

0 comments on commit 61f7441

Please sign in to comment.