summary refs log tree commit diff
path: root/t
diff options
context:
space:
mode:
authorAlexis Sukrieh <alexis@weborama.com>2012-07-04 15:14:10 +0200
committerAlexis Sukrieh <alexis@weborama.com>2012-07-04 15:14:10 +0200
commit5a71e04a704ebc4b3e1449e58a6ba78f68ab7b60 (patch)
tree847855150cccc0c1e17c91ac8ea90845ce2b1910 /t
parentMerge pull request #17 from dams/master (diff)
downloadnet-riak-5a71e04a704ebc4b3e1449e58a6ba78f68ab7b60.tar.gz
Support for a timeout attribute in the PBC client
The timeout option was only supported for the REST client, the PBC role did
have a hard-coded timeout set to 30 seconds.

This patch allows the caller to change it, by passing the timeout attrbute to
the constructor.

A test script is provided.
Diffstat (limited to '')
-rw-r--r--t/pbc.t28
1 files changed, 28 insertions, 0 deletions
diff --git a/t/pbc.t b/t/pbc.t
new file mode 100644
index 0000000..326ec3b
--- /dev/null
+++ b/t/pbc.t
@@ -0,0 +1,28 @@
+use Net::Riak;
+use strict;
+use warnings;
+
+use Test::More;
+
+my $r = Net::Riak->new(
+        transport => 'PBC',
+        host => '10.0.0.40',
+        port => 8080
+    );
+
+is $r->client->timeout,30, "timeout defaults to 30";
+
+my $r = Net::Riak->new(
+        transport => 'PBC',
+        host => '10.0.0.40',
+        port => 8080,
+        timeout => 2,
+    );
+
+is $r->client->timeout, 2, "timeout changed";
+
+
+
+
+
+done_testing;