File tree Expand file tree Collapse file tree 3 files changed +293
-31
lines changed
Expand file tree Collapse file tree 3 files changed +293
-31
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ warp = { workspace = true }
3838
3939[features ]
4040default = [" get_status_duration" ]
41+ test = []
4142get_status_duration = []
4243
4344[dev-dependencies ]
Original file line number Diff line number Diff line change 11#[ cfg( feature = "get_status_duration" ) ]
2+ #[ cfg_attr( test, derive( Debug ) ) ]
23pub struct StatusCheckDurations {
34 pub check_taiko_wrapper : std:: time:: Duration ,
45 pub check_handover_window_slots : std:: time:: Duration ,
@@ -12,6 +13,7 @@ pub struct StatusCheckDurations {
1213 pub check_end_of_sequencing : std:: time:: Duration ,
1314}
1415
16+ #[ cfg_attr( test, derive( Debug ) ) ]
1517pub struct Status {
1618 preconfer : bool ,
1719 submitter : bool ,
@@ -22,6 +24,17 @@ pub struct Status {
2224 durations : Option < StatusCheckDurations > ,
2325}
2426
27+ #[ cfg( test) ]
28+ impl PartialEq for Status {
29+ fn eq ( & self , other : & Self ) -> bool {
30+ self . preconfer == other. preconfer
31+ && self . submitter == other. submitter
32+ && self . preconfirmation_started == other. preconfirmation_started
33+ && self . end_of_sequencing == other. end_of_sequencing
34+ && self . is_driver_synced == other. is_driver_synced
35+ }
36+ }
37+
2538impl Status {
2639 pub fn new (
2740 preconfer : bool ,
You can’t perform that action at this time.
0 commit comments