Skip to content

Commit a5f7699

Browse files
committed
fixed test and start plan commando
1 parent 0022d7f commit a5f7699

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/connection/admin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ impl Admin {
2020

2121
let start = StartPlanRequest::create(&mut builder, &StartPlanRequestArgs{ id: id as u64 });
2222

23-
let msg = Self::wrap_msg(&mut builder, Payload::StopPlanRequest, start.as_union_value());
23+
let msg = Self::wrap_msg(&mut builder, Payload::StartPlanRequest, start.as_union_value());
2424

2525
self.write_all(&msg)?;
2626

src/messages/plan.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ impl TryFrom<Message<'_>> for StartPlan {
9696
let already_running = msg.data_as_start_plan_response().ok_or(String::from("Did not contain start."))?.already_running();
9797
Ok(StartPlan { already_running })
9898
},
99-
err => Err(String::from(format!("Wrong datatype {:?}", err)))
99+
err => Err(format!("Wrong datatype {:?}", err))
100100
}
101101
}
102102
}
@@ -113,7 +113,7 @@ impl TryFrom<Message<'_>> for StopPlan {
113113
let already_stopped = msg.data_as_stop_plan_response().ok_or(String::from("Did not contain start."))?.already_stopped();
114114
Ok(StopPlan { already_stopped })
115115
},
116-
err => Err(String::from(format!("Wrong datatype {:?}", err)))
116+
err => Err(format!("Wrong datatype {:?}", err))
117117
}
118118
}
119119
}

src/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ mod tests{
118118
let mut connection = client.connect().unwrap();
119119

120120

121-
for _ in 0..10 {
121+
for _ in 0..10_000_000 {
122122
connection.send("This is a test sentence.").unwrap();
123123
}
124124
//admin.delete_plan(id).unwrap();

0 commit comments

Comments
 (0)