Skip to content

Commit

Permalink
Make PubSub subscriber Scheduler inherit from ABC (#7690)
Browse files Browse the repository at this point in the history
  • Loading branch information
plamut authored Apr 24, 2019
1 parent ec14bbd commit 7755867
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pubsub/google/cloud/pubsub_v1/subscriber/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def _make_default_thread_pool_executor():
return concurrent.futures.ThreadPoolExecutor(max_workers=10, **executor_kwargs)


class ThreadScheduler(object):
class ThreadScheduler(Scheduler):
"""A thread pool-based scheduler.
This scheduler is useful in typical I/O-bound message processing.
Expand Down
4 changes: 4 additions & 0 deletions pubsub/tests/unit/pubsub_v1/subscriber/test_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
from google.cloud.pubsub_v1.subscriber import scheduler


def test_subclasses_base_abc():
assert issubclass(scheduler.ThreadScheduler, scheduler.Scheduler)


def test_constructor_defaults():
scheduler_ = scheduler.ThreadScheduler()

Expand Down

0 comments on commit 7755867

Please sign in to comment.