about summary refs log tree commit homepage
path: root/xt/mem-nntpd-tls.t
diff options
context:
space:
mode:
Diffstat (limited to 'xt/mem-nntpd-tls.t')
-rw-r--r--xt/mem-nntpd-tls.t20
1 files changed, 10 insertions, 10 deletions
diff --git a/xt/mem-nntpd-tls.t b/xt/mem-nntpd-tls.t
index 6e34d233..ec639a8b 100644
--- a/xt/mem-nntpd-tls.t
+++ b/xt/mem-nntpd-tls.t
@@ -9,7 +9,7 @@ use Socket qw(SOCK_STREAM IPPROTO_TCP SOL_SOCKET);
 require_mods(qw(-nntpd));
 require PublicInbox::InboxWritable;
 require PublicInbox::SearchIdx;
-use PublicInbox::Syscall qw(:epoll);
+use PublicInbox::Syscall;
 use PublicInbox::DS;
 my $version = 2; # v2 needs newer git
 require_git('2.6') if $version >= 2;
@@ -104,8 +104,8 @@ 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->SetPostLoopCallback(\&once);
+$PublicInbox::DS::loop_timeout = 0;
+local @PublicInbox::DS::post_loop_do = (\&once);
 
 foreach my $n (1..$nfd) {
         my $io = tcp_connect($nntps, Blocking => 0);
@@ -119,15 +119,15 @@ 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->SetPostLoopCallback(sub { $DONE != $n });
+                $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->SetPostLoopCallback(\&once);
+                $PublicInbox::DS::loop_timeout = 0;
+                @PublicInbox::DS::post_loop_do = (\&once);
         }
 }
 my $pid = $td->{pid};
@@ -140,8 +140,8 @@ $dump_rss->();
 
 # run the event loop normally, now:
 if ($DONE != $nfd) {
-        PublicInbox::DS->SetLoopTimeout(-1);
-        PublicInbox::DS->SetPostLoopCallback(sub {
+        $PublicInbox::DS::loop_timeout = -1;
+        @PublicInbox::DS::post_loop_do = (sub {
                 diag "done: ".time." $DONE";
                 $DONE != $nfd;
         });
@@ -163,7 +163,7 @@ done_testing();
 package NNTPC;
 use v5.12;
 use parent qw(PublicInbox::DS);
-use PublicInbox::Syscall qw(EPOLLIN EPOLLOUT EPOLLONESHOT);
+use PublicInbox::Syscall qw(EPOLLOUT EPOLLONESHOT);
 use Data::Dumper;
 
 # return true if complete, false if incomplete (or failure)