Browse Source

`{active, N}` for SSL is only supported on OTP-21+

Sergey Prokhorov 2 years ago
parent
commit
958eb97d4f
2 changed files with 12 additions and 0 deletions
  1. 6 0
      test/epgsql_SUITE.erl
  2. 6 0
      test/epgsql_replication_SUITE.erl

+ 6 - 0
test/epgsql_SUITE.erl

@@ -1630,6 +1630,7 @@ incremental_sock_active_n(Config) ->
          "epgsql_test",
          [{socket_active, 2}]).
 
+-ifdef(OTP_RELEASE).
 incremental_sock_active_n_ssl(Config) ->
     epgsql_incremental = ?config(module, Config),
     Q = "SELECT *, 'Hello world' FROM generate_series(0, 10240)",
@@ -1645,6 +1646,11 @@ incremental_sock_active_n_ssl(Config) ->
          end,
          "epgsql_test",
          [{ssl, true}, {socket_active, 2}]).
+-else.
+%% {active, N} for SSL is only supported on OTP-21+
+incremental_sock_active_n_ssl(_Config) ->
+    noop.
+-endif.
 
 recv_incremental_active_n(C, Ref) ->
     recv_incremental_active_n(C, Ref, 0, [], []).

+ 6 - 0
test/epgsql_replication_SUITE.erl

@@ -66,8 +66,14 @@ replication_async_active_n_socket(Config) ->
 replication_sync_active_n_socket(Config) ->
   replication_test_run(Config, ?MODULE, [{socket_active, 1}]).
 
+-ifdef(OTP_RELEASE).
 replication_async_active_n_ssl(Config) ->
   replication_test_run(Config, self(), [{socket_active, 1}, {ssl, require}]).
+-else.
+%% {active, N} for SSL is only supported on OTP-21+
+replication_async_active_n_ssl(Config) ->
+    noop.
+-endif.
 
 replication_test_run(Config, Callback) ->
   replication_test_run(Config, Callback, []).