removed redundant imports
This commit is contained in:
@@ -120,7 +120,6 @@ impl<T: ChainDataFetcher> IoHandler<ClientIoMessage> for ImportBlocks<T> {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::Service;
|
||||
use devtools::RandomTempPath;
|
||||
use ethcore::spec::Spec;
|
||||
|
||||
use std::sync::Arc;
|
||||
@@ -128,13 +127,14 @@ mod tests {
|
||||
use client::fetch;
|
||||
use time::Duration;
|
||||
use parking_lot::Mutex;
|
||||
use tempdir::TempDir;
|
||||
|
||||
#[test]
|
||||
fn it_works() {
|
||||
let tempdir = TempDir::new("").unwrap();
|
||||
let spec = Spec::new_test();
|
||||
let temp_path = RandomTempPath::new();
|
||||
let cache = Arc::new(Mutex::new(Cache::new(Default::default(), Duration::hours(6))));
|
||||
|
||||
Service::start(Default::default(), &spec, fetch::unavailable(), temp_path.as_path(), cache).unwrap();
|
||||
Service::start(Default::default(), &spec, fetch::unavailable(), tempdir.path(), cache).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,4 +84,4 @@ extern crate kvdb_rocksdb;
|
||||
extern crate memory_cache;
|
||||
|
||||
#[cfg(test)]
|
||||
extern crate ethcore_devtools as devtools;
|
||||
extern crate tempdir;
|
||||
|
||||
@@ -264,8 +264,9 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn file_store() {
|
||||
let path = ::devtools::RandomTempPath::new();
|
||||
let store = FileStore(path.as_path().clone());
|
||||
let tempdir = ::tempdir::TempDir::new("").unwrap();
|
||||
let path = tempdir.path().join("file");
|
||||
let store = FileStore(path);
|
||||
|
||||
let mut samples = store.load();
|
||||
assert!(samples.is_empty());
|
||||
|
||||
Reference in New Issue
Block a user