@@ -55,7 +55,7 @@ pub struct LegacyNewSessionParameters {
55
55
/// binary, controlling it, running tests, scraping output, displaying output,
56
56
/// etc. It will return `Ok` if all tests finish successfully, and otherwise it
57
57
/// will return an error if some tests failed.
58
- pub fn run ( server : & SocketAddr , shell : & Shell ) -> Result < ( ) , Error > {
58
+ pub fn run ( server : & SocketAddr , shell : & Shell , timeout : u64 ) -> Result < ( ) , Error > {
59
59
let driver = Driver :: find ( ) ?;
60
60
let mut drop_log: Box < dyn FnMut ( ) > = Box :: new ( || ( ) ) ;
61
61
let driver_url = match driver. location ( ) {
@@ -145,7 +145,7 @@ pub fn run(server: &SocketAddr, shell: &Shell) -> Result<(), Error> {
145
145
// information.
146
146
shell. status ( "Waiting for test to finish..." ) ;
147
147
let start = Instant :: now ( ) ;
148
- let max = Duration :: new ( 20 , 0 ) ;
148
+ let max = Duration :: new ( timeout , 0 ) ;
149
149
while start. elapsed ( ) < max {
150
150
if client. text ( & id, & output) ?. contains ( "test result: " ) {
151
151
break ;
@@ -170,7 +170,7 @@ pub fn run(server: &SocketAddr, shell: &Shell) -> Result<(), Error> {
170
170
// output, so we shouldn't need the driver logs to get printed.
171
171
drop_log ( ) ;
172
172
} else {
173
- println ! ( "failed to detect test as having been run" ) ;
173
+ println ! ( "Failed to detect test as having been run. It might have timed out. " ) ;
174
174
if output. len ( ) > 0 {
175
175
println ! ( "output div contained:\n {}" , tab( & output) ) ;
176
176
}
0 commit comments