diff --git a/test/pubsub_tests.erl b/test/pubsub_tests.erl index b4950ef33..3552f7263 100644 --- a/test/pubsub_tests.erl +++ b/test/pubsub_tests.erl @@ -55,6 +55,7 @@ single_cases() -> single_test(test_delete_item), single_test(test_purge), single_test(test_subscribe), + single_test(test_subscribe_max_item_1), single_test(test_unsubscribe)]}. test_features(Config) -> @@ -163,6 +164,16 @@ test_subscribe(Config) -> delete_node(Config, Node), disconnect(Config). +test_subscribe_max_item_1(Config) -> + DefaultNodeConfig = get_default_node_config(Config), + CustomNodeConfig = set_opts(DefaultNodeConfig, + [{max_items, 1}]), + Node = create_node(Config, <<>>, CustomNodeConfig), + #ps_subscription{type = subscribed} = subscribe_node(Config, Node), + [#ps_subscription{node = Node}] = get_subscriptions(Config), + delete_node(Config, Node), + disconnect(Config). + test_unsubscribe(Config) -> Node = create_node(Config, <<>>), subscribe_node(Config, Node),