Fix issues with delete on start

Seems like Windows doesn't handle it properly?
pull/6/head
Bradlee Speice 2019-10-07 07:02:02 -04:00
parent 7e8f49c347
commit 2cd2ae9995
2 changed files with 11 additions and 6 deletions

View File

@ -85,10 +85,13 @@ mod tests {
#[test]
fn read_cnc_version() {
let temp_dir = tempdir().unwrap();
let dir = temp_dir.path().to_path_buf();
temp_dir.close();
let dir = tempdir().unwrap().into_path();
let _driver = DriverContext::default()
.set_aeron_dir(&dir)
.set_dir_delete_on_start(true)
.build()
.unwrap();

View File

@ -171,10 +171,12 @@ mod tests {
#[test]
fn multiple_startup_failure() {
let dir = tempdir().unwrap().into_path();
let temp_dir = tempdir().unwrap();
let dir = temp_dir.path().to_path_buf();
temp_dir.close();
let driver = DriverContext::default()
.set_aeron_dir(&dir)
.set_dir_delete_on_start(true)
.build()
.unwrap();
@ -207,12 +209,12 @@ mod tests {
#[test]
fn single_duty_cycle() {
let tempdir = tempfile::tempdir().unwrap();
let path = tempdir.into_path();
let temp_dir = tempdir().unwrap();
let path = temp_dir.path().to_path_buf();
tempdir.close();
let driver = DriverContext::default()
.set_aeron_dir(&path)
.set_dir_delete_on_start(true)
.build()
.expect("Unable to create media driver")
.start()