Made records produce a document name.
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 1s
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 1s
This commit is contained in:
@@ -22,21 +22,27 @@ impl Clock {
|
||||
Self { queue: queue }
|
||||
}
|
||||
|
||||
pub fn doc_names() -> Vec<Name> {
|
||||
vec![Name::english("clock")]
|
||||
}
|
||||
|
||||
/*
|
||||
fn get_name() -> Name {
|
||||
Name::english("clock")
|
||||
}
|
||||
*/
|
||||
|
||||
fn gen_message() -> Message {
|
||||
Message::new(
|
||||
Clock::get_name(),
|
||||
MsgAction::OnUpdate(Records::new(Names::new())),
|
||||
Clock::doc_names()[0].clone(),
|
||||
MsgAction::OnUpdate(Records::new(Clock::doc_names(), Names::new())),
|
||||
)
|
||||
}
|
||||
|
||||
pub fn get_path() -> Path {
|
||||
Path::new(
|
||||
Include::All,
|
||||
Include::Just(Clock::get_name().into()),
|
||||
Include::Just(Clock::doc_names()[0].clone().into()),
|
||||
Include::Just(Action::OnUpdate),
|
||||
)
|
||||
}
|
||||
@@ -45,7 +51,7 @@ impl Clock {
|
||||
let clock = Clock::new(queue.clone());
|
||||
let (tx, rx) = channel();
|
||||
let id = queue.add_sender(tx);
|
||||
let reg_msg = Register::new(id, RegMsg::AddDocName([Clock::get_name()].to_vec()));
|
||||
let reg_msg = Register::new(id, RegMsg::AddDocName(Clock::doc_names()));
|
||||
let msg = Message::new(NameType::None, reg_msg.clone());
|
||||
queue.send(msg);
|
||||
rx.recv().unwrap();
|
||||
@@ -99,7 +105,7 @@ mod clocks {
|
||||
let end = Utc::now();
|
||||
assert!((end - start) > TimeDelta::seconds(1));
|
||||
assert!((end - start) < TimeDelta::seconds(2));
|
||||
let reg_request = Register::new(id, RegMsg::GetNameID(Clock::get_name()));
|
||||
let reg_request = Register::new(id, RegMsg::GetNameID(Clock::doc_names()[0].clone()));
|
||||
queue.send(Message::new(NameType::None, reg_request));
|
||||
rx.recv_timeout(TIMEOUT).unwrap();
|
||||
for msg in holder.iter() {
|
||||
|
||||
Reference in New Issue
Block a user