Skip to content

Commit

Permalink
Add simple test for ThreadPoolServer
Browse files Browse the repository at this point in the history
  • Loading branch information
coldfix committed Aug 3, 2018
1 parent e4e0126 commit 4b7f530
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/test_threaded_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import rpyc
import time
import tempfile
from rpyc.utils.server import ThreadedServer
from rpyc.utils.server import ThreadedServer, ThreadPoolServer
from rpyc import SlaveService
import unittest

Expand Down Expand Up @@ -47,5 +47,14 @@ def test_connection(self):
self.assertEqual(c.eval("1+x"), 6)
c.close()


class Test_ThreadPoolServer(Test_ThreadedServer):

def setUp(self):
self.server = ThreadPoolServer(SlaveService, port=18878, auto_register=False)
self.server.logger.quiet = False
self.server._start_in_thread()


if __name__ == "__main__":
unittest.main()

0 comments on commit 4b7f530

Please sign in to comment.