about summary refs log tree commit homepage
path: root/xt
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-10-17 23:38:00 +0000
committerEric Wong <e@80x24.org>2023-10-18 20:50:31 +0000
commit2f61bdb6e39bd8079c0e5bd7f2366d3a473c6f68 (patch)
tree73552d93c42bc6333e6a48bdd165020a6106a471 /xt
parenta4cf3bd57d17577b6dd791d4f0f8e76758d0aafe (diff)
downloadpublic-inbox-2f61bdb6e39bd8079c0e5bd7f2366d3a473c6f68.tar.gz
It's not worth the code and memory to have a setter method we
never use outside of tests.
Diffstat (limited to 'xt')
-rw-r--r--xt/mem-imapd-tls.t8
-rw-r--r--xt/mem-nntpd-tls.t8
2 files changed, 8 insertions, 8 deletions
diff --git a/xt/mem-imapd-tls.t b/xt/mem-imapd-tls.t
index 00199a9b..58581017 100644
--- a/xt/mem-imapd-tls.t
+++ b/xt/mem-imapd-tls.t
@@ -81,7 +81,7 @@ sub once { 0 }; # stops event loop
 
 # setup the event loop so that it exits at every step
 # while we're still doing connect(2)
-PublicInbox::DS->SetLoopTimeout(0);
+$PublicInbox::DS::loop_timeout = 0;
 local @PublicInbox::DS::post_loop_do = (\&once);
 my $pid = $td->{pid};
 if ($^O eq 'linux' && open(my $f, '<', "/proc/$pid/status")) {
@@ -100,21 +100,21 @@ foreach my $n (1..$nfd) {
         # try not to overflow the listen() backlog:
         if (!($n % 128) && $DONE != $n) {
                 diag("nr: ($n) $DONE/$nfd");
-                PublicInbox::DS->SetLoopTimeout(-1);
+                $PublicInbox::DS::loop_timeout = -1;
                 local @PublicInbox::DS::post_loop_do = (sub { $DONE != $n });
 
                 # clear the backlog:
                 PublicInbox::DS::event_loop();
 
                 # resume looping
-                PublicInbox::DS->SetLoopTimeout(0);
+                $PublicInbox::DS::loop_timeout = 0;
         }
 }
 
 # run the event loop normally, now:
 diag "done?: @".time." $DONE/$nfd";
 if ($DONE != $nfd) {
-        PublicInbox::DS->SetLoopTimeout(-1);
+        $PublicInbox::DS::loop_timeout = -1;
         local @PublicInbox::DS::post_loop_do = (sub { $DONE != $nfd });
         PublicInbox::DS::event_loop();
 }
diff --git a/xt/mem-nntpd-tls.t b/xt/mem-nntpd-tls.t
index f9b98a6b..ec639a8b 100644
--- a/xt/mem-nntpd-tls.t
+++ b/xt/mem-nntpd-tls.t
@@ -104,7 +104,7 @@ sub once { 0 }; # stops event loop
 
 # setup the event loop so that it exits at every step
 # while we're still doing connect(2)
-PublicInbox::DS->SetLoopTimeout(0);
+$PublicInbox::DS::loop_timeout = 0;
 local @PublicInbox::DS::post_loop_do = (\&once);
 
 foreach my $n (1..$nfd) {
@@ -119,14 +119,14 @@ foreach my $n (1..$nfd) {
         # try not to overflow the listen() backlog:
         if (!($n % 128) && $n != $DONE) {
                 diag("nr: ($n) $DONE/$nfd");
-                PublicInbox::DS->SetLoopTimeout(-1);
+                $PublicInbox::DS::loop_timeout = -1;
                 @PublicInbox::DS::post_loop_do = (sub { $DONE != $n });
 
                 # clear the backlog:
                 PublicInbox::DS::event_loop();
 
                 # resume looping
-                PublicInbox::DS->SetLoopTimeout(0);
+                $PublicInbox::DS::loop_timeout = 0;
                 @PublicInbox::DS::post_loop_do = (\&once);
         }
 }
@@ -140,7 +140,7 @@ $dump_rss->();
 
 # run the event loop normally, now:
 if ($DONE != $nfd) {
-        PublicInbox::DS->SetLoopTimeout(-1);
+        $PublicInbox::DS::loop_timeout = -1;
         @PublicInbox::DS::post_loop_do = (sub {
                 diag "done: ".time." $DONE";
                 $DONE != $nfd;