update Object::Remote::connect() to pass arguments to the connection
[scpubgit/Object-Remote.git] / t / watchdog.t
index c7e2c1f..e6f036b 100644 (file)
@@ -1,14 +1,14 @@
 use strictures 1;
 use Test::More;
 
-require 't/logsetup.pl';
+$ENV{OBJECT_REMOTE_TEST_LOGGER} = 1;
 
 use Object::Remote::Connection;
 use Object::Remote::FromData; 
 
 $SIG{ALRM} = sub {  fail("Watchdog killed remote process in time"); die "test failed" };
 
-my $conn = Object::Remote::Connection->conn_from_spec("-", watchdog_timeout => 1)->connect;
+my $conn = Object::Remote->connect("-", watchdog_timeout => 1);
 
 my $remote = HangClass->new::on($conn);
 
@@ -30,13 +30,13 @@ package HangClass;
 use Moo;
 
 sub alive {
-    return 1; 
+  return 1; 
 }
 
 sub hang {
-    while(1) {
-        sleep(1); 
-    }
+  while(1) {
+    sleep(1); 
+  }
 }