From 5b12a4bbec9ead4f35656d3068cabaafc05ce520 Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Mon, 27 Jun 2016 15:22:05 +0200 Subject: odbc: Remove legacy suite clauses from test suites --- lib/odbc/test/odbc_connect_SUITE.erl | 21 ----------- lib/odbc/test/odbc_data_type_SUITE.erl | 60 ------------------------------ lib/odbc/test/odbc_query_SUITE.erl | 68 ---------------------------------- lib/odbc/test/odbc_start_SUITE.erl | 3 -- 4 files changed, 152 deletions(-) diff --git a/lib/odbc/test/odbc_connect_SUITE.erl b/lib/odbc/test/odbc_connect_SUITE.erl index 5727c1ca50..942750e4b1 100644 --- a/lib/odbc/test/odbc_connect_SUITE.erl +++ b/lib/odbc/test/odbc_connect_SUITE.erl @@ -166,7 +166,6 @@ end_per_testcase_common(Config) -> %%------------------------------------------------------------------------- commit(doc)-> ["Test the use of explicit commit"]; -commit(suite) -> []; commit(Config) -> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), [{auto_commit, off}] ++ odbc_test_lib:platform_options()), @@ -207,7 +206,6 @@ commit(Config) -> rollback(doc)-> ["Test the use of explicit rollback"]; -rollback(suite) -> []; rollback(Config) -> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), [{auto_commit, off}] ++ odbc_test_lib:platform_options()), @@ -247,7 +245,6 @@ rollback(Config) -> %%------------------------------------------------------------------------- not_explicit_commit(doc) -> ["Test what happens if you try using commit on a auto_commit connection."]; -not_explicit_commit(suite) -> []; not_explicit_commit(_Config) -> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), [{auto_commit, on}] ++ @@ -258,7 +255,6 @@ not_explicit_commit(_Config) -> %%------------------------------------------------------------------------- not_exist_db(doc) -> ["Tests valid data format but invalid data in the connection parameters."]; -not_exist_db(suite) -> []; not_exist_db(_Config) -> {error, _} = odbc:connect("DSN=foo;UID=bar;PWD=foobar", odbc_test_lib:platform_options()), @@ -268,7 +264,6 @@ not_exist_db(_Config) -> %%------------------------------------------------------------------------- no_c_executable(doc) -> "Test what happens if the port-program can not be found"; -no_c_executable(suite) -> []; no_c_executable(_Config) -> process_flag(trap_exit, true), Dir = filename:nativename(filename:join(code:priv_dir(odbc), @@ -295,7 +290,6 @@ no_c_executable(_Config) -> port_dies(doc) -> "Tests what happens if the port program dies"; -port_dies(suite) -> []; port_dies(_Config) -> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), odbc_test_lib:platform_options()), {status, _} = process_info(Ref, status), @@ -317,7 +311,6 @@ port_dies(_Config) -> %%------------------------------------------------------------------------- control_process_dies(doc) -> "Tests what happens if the Erlang control process dies"; -control_process_dies(suite) -> []; control_process_dies(_Config) -> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), odbc_test_lib:platform_options()), process_flag(trap_exit, true), @@ -336,7 +329,6 @@ control_process_dies(_Config) -> %%------------------------------------------------------------------------- client_dies_normal(doc) -> ["Client dies with reason normal."]; -client_dies_normal(suite) -> []; client_dies_normal(Config) when is_list(Config) -> Pid = spawn(?MODULE, client_normal, [self()]), @@ -368,7 +360,6 @@ client_normal(Pid) -> %%------------------------------------------------------------------------- client_dies_timeout(doc) -> ["Client dies with reason timeout."]; -client_dies_timeout(suite) -> []; client_dies_timeout(Config) when is_list(Config) -> Pid = spawn(?MODULE, client_timeout, [self()]), @@ -400,7 +391,6 @@ client_timeout(Pid) -> %%------------------------------------------------------------------------- client_dies_error(doc) -> ["Client dies with reason error."]; -client_dies_error(suite) -> []; client_dies_error(Config) when is_list(Config) -> Pid = spawn(?MODULE, client_error, [self()]), @@ -432,7 +422,6 @@ client_error(Pid) -> %%------------------------------------------------------------------------- connect_timeout(doc) -> ["Test the timeout for the connect function."]; -connect_timeout(suite) -> []; connect_timeout(Config) when is_list(Config) -> {'EXIT',timeout} = (catch odbc:connect(?RDBMS:connection_string(), [{timeout, 0}] ++ @@ -445,7 +434,6 @@ connect_timeout(Config) when is_list(Config) -> connect_port_timeout(doc) -> ["Test the timeout for the port program to connect back to the odbc " "application within the connect function."]; -connect_port_timeout(suite) -> []; connect_port_timeout(Config) when is_list(Config) -> %% Application environment var 'port_timeout' has been set to 0 by %% init_per_testcase/2. @@ -456,7 +444,6 @@ connect_port_timeout(Config) when is_list(Config) -> timeout(doc) -> ["Test that timeouts don't cause unwanted behavior sush as receiving" " an anwser to a previously tiemed out query."]; -timeout(suite) -> []; timeout(Config) when is_list(Config) -> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), @@ -540,7 +527,6 @@ update_table_timeout(Table, TimeOut, Pid) -> many_timeouts(doc) -> ["Tests that many consecutive timeouts lead to that the connection " "is shutdown."]; -many_timeouts(suite) -> []; many_timeouts(Config) when is_list(Config) -> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), [{auto_commit, off}] ++ odbc_test_lib:platform_options()), @@ -600,7 +586,6 @@ loop_many_timouts(Ref, UpdateQuery, TimeOut) -> timeout_reset(doc) -> ["Check that the number of consecutive timouts is reset to 0 when " "a successful call to the database is made."]; -timeout_reset(suite) -> []; timeout_reset(Config) when is_list(Config) -> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), [{auto_commit, off}] ++ odbc_test_lib:platform_options()), @@ -697,7 +682,6 @@ loop_timout_reset(Ref, UpdateQuery, TimeOut, NumTimeouts) -> disconnect_on_timeout(doc) -> ["Check that disconnect after a time out works properly"]; -disconnect_on_timeout(suite) -> []; disconnect_on_timeout(Config) when is_list(Config) -> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), @@ -747,7 +731,6 @@ update_table_disconnect_on_timeout(Table, TimeOut, Pid) -> connection_closed(doc) -> ["Checks that you get an appropriate error message if you try to" " use a connection that has been closed"]; -connection_closed(suite) -> []; connection_closed(Config) when is_list(Config) -> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), odbc_test_lib:platform_options()), @@ -773,7 +756,6 @@ connection_closed(Config) when is_list(Config) -> %%------------------------------------------------------------------------- disable_scrollable_cursors(doc) -> ["Test disabling of scrollable cursors."]; -disable_scrollable_cursors(suite) -> []; disable_scrollable_cursors(Config) when is_list(Config) -> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), [{scrollable_cursors, off}]), @@ -812,7 +794,6 @@ disable_scrollable_cursors(Config) when is_list(Config) -> return_rows_as_lists(doc)-> ["Test the option that a row may be returned as a list instead " "of a tuple. Too be somewhat backward compatible."]; -return_rows_as_lists(suite) -> []; return_rows_as_lists(Config) when is_list(Config) -> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), [{tuple_row, off}] ++ odbc_test_lib:platform_options()), @@ -856,7 +837,6 @@ return_rows_as_lists(Config) when is_list(Config) -> api_missuse(doc)-> ["Test that behaviour of the control process if the api is abused"]; -api_missuse(suite) -> []; api_missuse(Config) when is_list(Config)-> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), odbc_test_lib:platform_options()), @@ -890,7 +870,6 @@ extended_errors(doc)-> ["Test the extended errors connection option: When off; the old behaviour of just an error " "string is returned on error. When on, the error string is replaced by a 3 element tuple " "that also exposes underlying ODBC provider error codes."]; -extended_errors(suite) -> []; extended_errors(Config) when is_list(Config)-> Table = ?config(tableName, Config), {ok, Ref} = odbc:connect(?RDBMS:connection_string(), odbc_test_lib:platform_options()), diff --git a/lib/odbc/test/odbc_data_type_SUITE.erl b/lib/odbc/test/odbc_data_type_SUITE.erl index c88c00725e..6dec8fa0a3 100644 --- a/lib/odbc/test/odbc_data_type_SUITE.erl +++ b/lib/odbc/test/odbc_data_type_SUITE.erl @@ -248,8 +248,6 @@ end_per_testcase(_TestCase, Config) -> char_fixed_lower_limit(doc) -> ["Tests fixed length char data type lower boundaries."]; -char_fixed_lower_limit(suite) -> - []; char_fixed_lower_limit(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -289,8 +287,6 @@ char_fixed_lower_limit(Config) when is_list(Config) -> char_fixed_upper_limit(doc) -> ["Tests fixed length char data type upper boundaries."]; -char_fixed_upper_limit(suite) -> - []; char_fixed_upper_limit(Config) when is_list(Config) -> case ?RDBMS of @@ -340,8 +336,6 @@ char_fixed_upper_limit(Config) when is_list(Config) -> char_fixed_padding(doc) -> ["Tests that data that is shorter than the given size is padded " "with blanks."]; -char_fixed_padding(suite) -> - []; char_fixed_padding(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -367,8 +361,6 @@ char_fixed_padding(Config) when is_list(Config) -> varchar_lower_limit(doc) -> ["Tests variable length char data type lower boundaries."]; -varchar_lower_limit(suite) -> - []; varchar_lower_limit(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -407,8 +399,6 @@ varchar_lower_limit(Config) when is_list(Config) -> varchar_upper_limit(doc) -> ["Tests variable length char data type upper boundaries."]; -varchar_upper_limit(suite) -> - []; varchar_upper_limit(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -458,8 +448,6 @@ varchar_upper_limit(Config) when is_list(Config) -> varchar_no_padding(doc) -> ["Tests that data that is shorter than the given max size is not padded " "with blanks."]; -varchar_no_padding(suite) -> - []; varchar_no_padding(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -483,8 +471,6 @@ varchar_no_padding(Config) when is_list(Config) -> text_lower_limit(doc) -> ["Tests 'long' char data type lower boundaries."]; -text_lower_limit(suite) -> - []; text_lower_limit(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -506,8 +492,6 @@ text_lower_limit(Config) when is_list(Config) -> text_upper_limit(doc) -> []; -text_upper_limit(suite) -> - []; text_upper_limit(Config) when is_list(Config) -> {skip,"Consumes too much resources" }. @@ -536,8 +520,6 @@ text_upper_limit(Config) when is_list(Config) -> binary_char_fixed_lower_limit(doc) -> ["Tests fixed length char data type lower boundaries."]; -binary_char_fixed_lower_limit(suite) -> - []; binary_char_fixed_lower_limit(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -581,8 +563,6 @@ binary_char_fixed_lower_limit(Config) when is_list(Config) -> binary_char_fixed_upper_limit(doc) -> ["Tests fixed length char data type upper boundaries."]; -binary_char_fixed_upper_limit(suite) -> - []; binary_char_fixed_upper_limit(Config) when is_list(Config) -> case ?RDBMS of @@ -633,8 +613,6 @@ binary_char_fixed_upper_limit(Config) when is_list(Config) -> binary_char_fixed_padding(doc) -> ["Tests that data that is shorter than the given size is padded " "with blanks."]; -binary_char_fixed_padding(suite) -> - []; binary_char_fixed_padding(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -660,8 +638,6 @@ binary_char_fixed_padding(Config) when is_list(Config) -> binary_varchar_lower_limit(doc) -> ["Tests variable length char data type lower boundaries."]; -binary_varchar_lower_limit(suite) -> - []; binary_varchar_lower_limit(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -703,8 +679,6 @@ binary_varchar_lower_limit(Config) when is_list(Config) -> binary_varchar_upper_limit(doc) -> ["Tests variable length char data type upper boundaries."]; -binary_varchar_upper_limit(suite) -> - []; binary_varchar_upper_limit(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -753,8 +727,6 @@ binary_varchar_upper_limit(Config) when is_list(Config) -> binary_varchar_no_padding(doc) -> ["Tests that data that is shorter than the given max size is not padded " "with blanks."]; -binary_varchar_no_padding(suite) -> - []; binary_varchar_no_padding(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -778,8 +750,6 @@ binary_varchar_no_padding(Config) when is_list(Config) -> binary_text_lower_limit(doc) -> ["Tests 'long' char data type lower boundaries."]; -binary_text_lower_limit(suite) -> - []; binary_text_lower_limit(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -801,8 +771,6 @@ binary_text_lower_limit(Config) when is_list(Config) -> binary_text_upper_limit(doc) -> []; -binary_text_upper_limit(suite) -> - []; binary_text_upper_limit(Config) when is_list(Config) -> {skip,"Consumes too much resources" }. @@ -832,8 +800,6 @@ binary_text_upper_limit(Config) when is_list(Config) -> tiny_int_lower_limit(doc) -> ["Tests integer of type tinyint."]; -tiny_int_lower_limit(suite) -> - []; tiny_int_lower_limit(Config) when is_list(Config) -> case ?RDBMS of postgres -> @@ -866,8 +832,6 @@ tiny_int_lower_limit(Config) when is_list(Config) -> tiny_int_upper_limit(doc) -> ["Tests integer of type tinyint."]; -tiny_int_upper_limit(suite) -> - []; tiny_int_upper_limit(Config) when is_list(Config) -> case ?RDBMS of postgres -> @@ -900,8 +864,6 @@ tiny_int_upper_limit(Config) when is_list(Config) -> small_int_lower_limit(doc) -> ["Tests integer of type smallint."]; -small_int_lower_limit(suite) -> - []; small_int_lower_limit(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -929,8 +891,6 @@ small_int_lower_limit(Config) when is_list(Config) -> small_int_upper_limit(doc) -> ["Tests integer of type smallint."]; -small_int_upper_limit(suite) -> - []; small_int_upper_limit(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -957,8 +917,6 @@ small_int_upper_limit(Config) when is_list(Config) -> %%------------------------------------------------------------------------- int_lower_limit(doc) -> ["Tests integer of type int."]; -int_lower_limit(suite) -> - []; int_lower_limit(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -985,8 +943,6 @@ int_lower_limit(Config) when is_list(Config) -> int_upper_limit(doc) -> ["Tests integer of type int."]; -int_upper_limit(suite) -> - []; int_upper_limit(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -1013,8 +969,6 @@ int_upper_limit(Config) when is_list(Config) -> %%------------------------------------------------------------------------- big_int_lower_limit(doc) -> ["Tests integer of type bigint"]; -big_int_lower_limit(suite) -> - []; big_int_lower_limit(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -1042,8 +996,6 @@ big_int_lower_limit(Config) when is_list(Config) -> big_int_upper_limit(doc) -> ["Tests integer of type bigint."]; -big_int_upper_limit(suite) -> - []; big_int_upper_limit(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -1070,8 +1022,6 @@ big_int_upper_limit(Config) when is_list(Config) -> bit_false(doc) -> [""]; -bit_false(suite) -> - []; bit_false(Config) when is_list(Config) -> case ?RDBMS of oracle -> @@ -1104,8 +1054,6 @@ bit_false(Config) when is_list(Config) -> bit_true(doc) -> [""]; -bit_true(suite) -> - []; bit_true(Config) when is_list(Config) -> case ?RDBMS of oracle -> @@ -1138,8 +1086,6 @@ bit_true(Config) when is_list(Config) -> %%------------------------------------------------------------------------- float_lower_limit(doc) -> [""]; -float_lower_limit(suite) -> - []; float_lower_limit(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), @@ -1188,8 +1134,6 @@ float_lower_limit(Config) when is_list(Config) -> %%------------------------------------------------------------------------- float_upper_limit(doc) -> [""]; -float_upper_limit(suite) -> - []; float_upper_limit(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -1220,8 +1164,6 @@ float_upper_limit(Config) when is_list(Config) -> %%------------------------------------------------------------------------- float_zero(doc) -> ["Test the float value zero."]; -float_zero(suite) -> - []; float_zero(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -1239,8 +1181,6 @@ float_zero(Config) when is_list(Config) -> %%------------------------------------------------------------------------- real_zero(doc) -> ["Test the real value zero."]; -real_zero(suite) -> - []; real_zero(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), diff --git a/lib/odbc/test/odbc_query_SUITE.erl b/lib/odbc/test/odbc_query_SUITE.erl index 5f719b7287..8a5c6bdd73 100644 --- a/lib/odbc/test/odbc_query_SUITE.erl +++ b/lib/odbc/test/odbc_query_SUITE.erl @@ -174,7 +174,6 @@ end_per_testcase(_Case, Config) -> %%------------------------------------------------------------------------- stored_proc(doc)-> ["Test stored proc with OUT param"]; -stored_proc(suite) -> []; stored_proc(Config) when is_list(Config) -> case ?RDBMS of X when X == oracle; X == postgres-> @@ -194,7 +193,6 @@ stored_proc(Config) when is_list(Config) -> sql_query(doc)-> ["Test the common cases"]; -sql_query(suite) -> []; sql_query(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -259,7 +257,6 @@ select_count(Config) when is_list(Config) -> %%------------------------------------------------------------------------- first(doc) -> ["Tests first/[1,2]"]; -first(suite) -> []; first(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -286,7 +283,6 @@ first(Config) when is_list(Config) -> %%------------------------------------------------------------------------- last(doc) -> ["Tests last/[1,2]"]; -last(suite) -> []; last(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -313,7 +309,6 @@ last(Config) when is_list(Config) -> %%------------------------------------------------------------------------- next(doc) -> ["Tests next/[1,2]"]; -next(suite) -> []; next(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -339,7 +334,6 @@ next(Config) when is_list(Config) -> %%------------------------------------------------------------------------- prev(doc) -> ["Tests prev/[1,2]"]; -prev(suite) -> []; prev(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -484,7 +478,6 @@ select_absolute(Config) when is_list(Config) -> %%------------------------------------------------------------------------- create_table_twice(doc) -> ["Test what happens if you try to create the same table twice."]; -create_table_twice(suite) -> []; create_table_twice(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -503,7 +496,6 @@ create_table_twice(Config) when is_list(Config) -> %%------------------------------------------------------------------------- delete_table_twice(doc) -> ["Test what happens if you try to delete the same table twice."]; -delete_table_twice(suite) -> []; delete_table_twice(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -542,7 +534,6 @@ duplicate_key(Config) when is_list(Config) -> not_connection_owner(doc) -> ["Test what happens if a process that did not start the connection" " tries to acess it."]; -not_connection_owner(suite) -> []; not_connection_owner(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -567,7 +558,6 @@ not_owner(Pid, Ref, Table) -> no_result_set(doc) -> ["Tests what happens if you try to use a function that needs an " "associated result set when there is none."]; -no_result_set(suite) -> []; no_result_set(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), @@ -584,8 +574,6 @@ no_result_set(Config) when is_list(Config) -> %%------------------------------------------------------------------------- query_error(doc) -> ["Test what happens if there is an error in the query."]; -query_error(suite) -> - []; query_error(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -607,8 +595,6 @@ query_error(Config) when is_list(Config) -> %%------------------------------------------------------------------------- multiple_select_result_sets(doc) -> ["Test what happens if you have a batch of select queries."]; -multiple_select_result_sets(suite) -> - []; multiple_select_result_sets(Config) when is_list(Config) -> case ?RDBMS of sqlserver -> @@ -643,8 +629,6 @@ multiple_select_result_sets(Config) when is_list(Config) -> multiple_mix_result_sets(doc) -> ["Test what happens if you have a batch of select and other type of" " queries."]; -multiple_mix_result_sets(suite) -> - []; multiple_mix_result_sets(Config) when is_list(Config) -> case ?RDBMS of sqlserver -> @@ -676,8 +660,6 @@ multiple_mix_result_sets(Config) when is_list(Config) -> %%------------------------------------------------------------------------- multiple_result_sets_error(doc) -> ["Test what happens if one of the batched queries fails."]; -multiple_result_sets_error(suite) -> - []; multiple_result_sets_error(Config) when is_list(Config) -> case ?RDBMS of sqlserver -> @@ -711,8 +693,6 @@ multiple_result_sets_error(Config) when is_list(Config) -> %%------------------------------------------------------------------------- param_insert_tiny_int(doc)-> ["Test insertion of tiny ints by parameterized queries."]; -param_insert_tiny_int(suite) -> - []; param_insert_tiny_int(Config) when is_list(Config) -> case ?RDBMS of sqlserver -> @@ -748,8 +728,6 @@ param_insert_tiny_int(Config) when is_list(Config) -> %%------------------------------------------------------------------------- param_insert_small_int(doc)-> ["Test insertion of small ints by parameterized queries."]; -param_insert_small_int(suite) -> - []; param_insert_small_int(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -780,8 +758,6 @@ param_insert_small_int(Config) when is_list(Config) -> %%------------------------------------------------------------------------- param_insert_int(doc)-> ["Test insertion of ints by parameterized queries."]; -param_insert_int(suite) -> - []; param_insert_int(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -812,8 +788,6 @@ param_insert_int(Config) when is_list(Config) -> %%------------------------------------------------------------------------- param_insert_integer(doc)-> ["Test insertion of integers by parameterized queries."]; -param_insert_integer(suite) -> - []; param_insert_integer(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -844,8 +818,6 @@ param_insert_integer(Config) when is_list(Config) -> %%------------------------------------------------------------------------- param_insert_decimal(doc)-> ["Test insertion of decimal numbers by parameterized queries."]; -param_insert_decimal(suite) -> - []; param_insert_decimal(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -895,8 +867,6 @@ param_insert_decimal(Config) when is_list(Config) -> %%------------------------------------------------------------------------- param_insert_numeric(doc)-> ["Test insertion of numeric numbers by parameterized queries."]; -param_insert_numeric(suite) -> - []; param_insert_numeric(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -946,8 +916,6 @@ param_insert_numeric(Config) when is_list(Config) -> %%------------------------------------------------------------------------- param_insert_char(doc)-> ["Test insertion of fixed length string by parameterized queries."]; -param_insert_char(suite) -> - []; param_insert_char(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -982,8 +950,6 @@ param_insert_char(Config) when is_list(Config) -> %%------------------------------------------------------------------------- param_insert_character(doc)-> ["Test insertion of fixed length string by parameterized queries."]; -param_insert_character(suite) -> - []; param_insert_character(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -1019,8 +985,6 @@ param_insert_character(Config) when is_list(Config) -> %%------------------------------------------------------------------------ param_insert_char_varying(doc)-> ["Test insertion of variable length strings by parameterized queries."]; -param_insert_char_varying(suite) -> - []; param_insert_char_varying(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -1056,8 +1020,6 @@ param_insert_char_varying(Config) when is_list(Config) -> %%------------------------------------------------------------------------- param_insert_character_varying(doc)-> ["Test insertion of variable length strings by parameterized queries."]; -param_insert_character_varying(suite) -> - []; param_insert_character_varying(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -1093,8 +1055,6 @@ param_insert_character_varying(Config) when is_list(Config) -> %%------------------------------------------------------------------------- param_insert_float(doc)-> ["Test insertion of floats by parameterized queries."]; -param_insert_float(suite) -> - []; param_insert_float(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -1132,8 +1092,6 @@ param_insert_float(Config) when is_list(Config) -> %%------------------------------------------------------------------------- param_insert_real(doc)-> ["Test insertion of real numbers by parameterized queries."]; -param_insert_real(suite) -> - []; param_insert_real(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -1173,8 +1131,6 @@ param_insert_real(Config) when is_list(Config) -> %%------------------------------------------------------------------------- param_insert_double(doc)-> ["Test insertion of doubles by parameterized queries."]; -param_insert_double(suite) -> - []; param_insert_double(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -1212,8 +1168,6 @@ param_insert_double(Config) when is_list(Config) -> %%------------------------------------------------------------------------- param_insert_mix(doc)-> ["Test insertion of a mixture of datatypes by parameterized queries."]; -param_insert_mix(suite) -> - []; param_insert_mix(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -1239,8 +1193,6 @@ param_insert_mix(Config) when is_list(Config) -> %%------------------------------------------------------------------------- param_update(doc)-> ["Test parameterized update query."]; -param_update(suite) -> - []; param_update(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -1303,8 +1255,6 @@ delete_nonexisting_row(Config) when is_list(Config) -> %%------------------------------------------------------------------------- param_delete(doc) -> ["Test parameterized delete query."]; -param_delete(suite) -> - []; param_delete(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -1338,8 +1288,6 @@ param_delete(Config) when is_list(Config) -> %%------------------------------------------------------------------------- param_select(doc) -> ["Test parameterized select query."]; -param_select(suite) -> - []; param_select(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -1368,8 +1316,6 @@ param_select(Config) when is_list(Config) -> %%------------------------------------------------------------------------- param_select_empty_params(doc) -> ["Test parameterized select query with no parameters."]; -param_select_empty_params(suite) -> - []; param_select_empty_params(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -1398,8 +1344,6 @@ param_select_empty_params(Config) when is_list(Config) -> %%------------------------------------------------------------------------- param_delete_empty_params(doc) -> ["Test parameterized delete query with no parameters."]; -param_delete_empty_params(suite) -> - []; param_delete_empty_params(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -1432,8 +1376,6 @@ param_delete_empty_params(Config) when is_list(Config) -> %%------------------------------------------------------------------------- describe_integer(doc) -> ["Test describe_table/[2,3] for integer columns."]; -describe_integer(suite) -> - []; describe_integer(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -1451,8 +1393,6 @@ describe_integer(Config) when is_list(Config) -> %%------------------------------------------------------------------------- describe_string(doc) -> ["Test describe_table/[2,3] for string columns."]; -describe_string(suite) -> - []; describe_string(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -1472,8 +1412,6 @@ describe_string(Config) when is_list(Config) -> %%------------------------------------------------------------------------- describe_floating(doc) -> ["Test describe_table/[2,3] for floting columns."]; -describe_floating(suite) -> - []; describe_floating(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -1492,8 +1430,6 @@ describe_floating(Config) when is_list(Config) -> %%------------------------------------------------------------------------- describe_dec_num(doc) -> ["Test describe_table/[2,3] for decimal and numerical columns"]; -describe_dec_num(suite) -> - []; describe_dec_num(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), @@ -1513,8 +1449,6 @@ describe_dec_num(Config) when is_list(Config) -> %%------------------------------------------------------------------------- describe_timestamp(doc) -> ["Test describe_table/[2,3] for tinmestap columns"]; -describe_timestamp(suite) -> - []; describe_timestamp(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), @@ -1532,8 +1466,6 @@ describe_timestamp(Config) when is_list(Config) -> %%------------------------------------------------------------------------- describe_no_such_table(doc) -> ["Test what happens if you try to describe a table that does not exist."]; -describe_no_such_table(suite) -> - []; describe_no_such_table(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), diff --git a/lib/odbc/test/odbc_start_SUITE.erl b/lib/odbc/test/odbc_start_SUITE.erl index f055eeb60e..670e498142 100644 --- a/lib/odbc/test/odbc_start_SUITE.erl +++ b/lib/odbc/test/odbc_start_SUITE.erl @@ -137,8 +137,6 @@ appup(Config) when is_list(Config) -> start(doc) -> ["Test start/stop of odbc"]; -start(suite) -> - []; start(Config) when is_list(Config) -> PlatformOptions = odbc_test_lib:platform_options(), {error,odbc_not_started} = odbc:connect(?RDBMS:connection_string(), @@ -172,7 +170,6 @@ start_odbc(Type) -> long_connection_line(doc)-> ["Test a connection line longer than 127 characters"]; -long_connection_line(suite) -> []; long_connection_line(_Config) -> odbc:start(), String133 = "unknown_odbc_parameter=01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789", -- cgit v1.2.3 From 39d2169bd96cafa13f3cbb5fea8eb30e093a3876 Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Mon, 27 Jun 2016 15:29:18 +0200 Subject: odbc: Remove legacy config macros --- lib/odbc/test/odbc_connect_SUITE.erl | 24 ++--- lib/odbc/test/odbc_data_type_SUITE.erl | 166 +++++++++++++++--------------- lib/odbc/test/odbc_query_SUITE.erl | 182 ++++++++++++++++----------------- lib/odbc/test/odbc_start_SUITE.erl | 2 +- 4 files changed, 187 insertions(+), 187 deletions(-) diff --git a/lib/odbc/test/odbc_connect_SUITE.erl b/lib/odbc/test/odbc_connect_SUITE.erl index 942750e4b1..6cbce7ceb9 100644 --- a/lib/odbc/test/odbc_connect_SUITE.erl +++ b/lib/odbc/test/odbc_connect_SUITE.erl @@ -153,12 +153,12 @@ end_per_testcase(_TestCase, Config) -> end_per_testcase_common(Config). end_per_testcase_common(Config) -> - Table = ?config(tableName, Config), + Table = proplists:get_value(tableName, Config), {ok, Ref} = odbc:connect(?RDBMS:connection_string(), odbc_test_lib:platform_options()), Result = odbc:sql_query(Ref, "DROP TABLE " ++ Table), io:format("Drop table: ~p ~p~n", [Table, Result]), odbc:disconnect(Ref), - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog). %%------------------------------------------------------------------------- @@ -170,7 +170,7 @@ commit(Config) -> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), [{auto_commit, off}] ++ odbc_test_lib:platform_options()), - Table = ?config(tableName, Config), + Table = proplists:get_value(tableName, Config), TransStr = transaction_support_str(?RDBMS), {updated, _} = @@ -210,7 +210,7 @@ rollback(Config) -> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), [{auto_commit, off}] ++ odbc_test_lib:platform_options()), - Table = ?config(tableName, Config), + Table = proplists:get_value(tableName, Config), TransStr = transaction_support_str(?RDBMS), @@ -448,7 +448,7 @@ timeout(Config) when is_list(Config) -> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), [{auto_commit, off}]), - Table = ?config(tableName, Config), + Table = proplists:get_value(tableName, Config), TransStr = transaction_support_str(?RDBMS), @@ -531,7 +531,7 @@ many_timeouts(Config) when is_list(Config) -> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), [{auto_commit, off}] ++ odbc_test_lib:platform_options()), - Table = ?config(tableName, Config), + Table = proplists:get_value(tableName, Config), TransStr = transaction_support_str(?RDBMS), {updated, _} = @@ -589,7 +589,7 @@ timeout_reset(doc) -> timeout_reset(Config) when is_list(Config) -> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), [{auto_commit, off}] ++ odbc_test_lib:platform_options()), - Table = ?config(tableName, Config), + Table = proplists:get_value(tableName, Config), TransStr = transaction_support_str(?RDBMS), {updated, _} = @@ -686,7 +686,7 @@ disconnect_on_timeout(Config) when is_list(Config) -> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), [{auto_commit, off}] ++ odbc_test_lib:platform_options()), - Table = ?config(tableName, Config), + Table = proplists:get_value(tableName, Config), TransStr = transaction_support_str(?RDBMS), {updated, _} = @@ -734,7 +734,7 @@ connection_closed(doc) -> connection_closed(Config) when is_list(Config) -> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), odbc_test_lib:platform_options()), - Table = ?config(tableName, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -760,7 +760,7 @@ disable_scrollable_cursors(Config) when is_list(Config) -> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), [{scrollable_cursors, off}]), - Table = ?config(tableName, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -798,7 +798,7 @@ return_rows_as_lists(Config) when is_list(Config) -> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), [{tuple_row, off}] ++ odbc_test_lib:platform_options()), - Table = ?config(tableName, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -871,7 +871,7 @@ extended_errors(doc)-> "string is returned on error. When on, the error string is replaced by a 3 element tuple " "that also exposes underlying ODBC provider error codes."]; extended_errors(Config) when is_list(Config)-> - Table = ?config(tableName, Config), + Table = proplists:get_value(tableName, Config), {ok, Ref} = odbc:connect(?RDBMS:connection_string(), odbc_test_lib:platform_options()), {updated, _} = odbc:sql_query(Ref, "create table " ++ Table ++" ( id integer, data varchar(10))"), diff --git a/lib/odbc/test/odbc_data_type_SUITE.erl b/lib/odbc/test/odbc_data_type_SUITE.erl index 6dec8fa0a3..d3c530e035 100644 --- a/lib/odbc/test/odbc_data_type_SUITE.erl +++ b/lib/odbc/test/odbc_data_type_SUITE.erl @@ -231,14 +231,14 @@ is_supported_bit(_) -> %% Description: Cleanup after each test case %%-------------------------------------------------------------------- end_per_testcase(_TestCase, Config) -> - Ref = ?config(connection_ref, Config), + Ref = proplists:get_value(connection_ref, Config), ok = odbc:disconnect(Ref), %% Clean up if needed - Table = ?config(tableName, Config), + Table = proplists:get_value(tableName, Config), {ok, NewRef} = odbc:connect(?RDBMS:connection_string(), odbc_test_lib:platform_options()), odbc:sql_query(NewRef, "DROP TABLE " ++ Table), odbc:disconnect(NewRef), - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -249,8 +249,8 @@ end_per_testcase(_TestCase, Config) -> char_fixed_lower_limit(doc) -> ["Tests fixed length char data type lower boundaries."]; char_fixed_lower_limit(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), %% Below limit {error, _} = @@ -293,8 +293,8 @@ char_fixed_upper_limit(Config) when is_list(Config) -> postgres -> {skip, "Limit unknown"}; _ -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), %% Upper limit {updated, _} = % Value == 0 || -1 driver dependent! @@ -337,8 +337,8 @@ char_fixed_padding(doc) -> ["Tests that data that is shorter than the given size is padded " "with blanks."]; char_fixed_padding(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), %% Data should be padded with blanks {updated, _} = % Value == 0 || -1 driver dependent! @@ -362,8 +362,8 @@ char_fixed_padding(Config) when is_list(Config) -> varchar_lower_limit(doc) -> ["Tests variable length char data type lower boundaries."]; varchar_lower_limit(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), %% Below limit {error, _} = @@ -400,8 +400,8 @@ varchar_lower_limit(Config) when is_list(Config) -> varchar_upper_limit(doc) -> ["Tests variable length char data type upper boundaries."]; varchar_upper_limit(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), case ?RDBMS of oracle -> @@ -449,8 +449,8 @@ varchar_no_padding(doc) -> ["Tests that data that is shorter than the given max size is not padded " "with blanks."]; varchar_no_padding(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), %% Data should NOT be padded with blanks {updated, _} = % Value == 0 || -1 driver dependent! @@ -472,8 +472,8 @@ varchar_no_padding(Config) when is_list(Config) -> text_lower_limit(doc) -> ["Tests 'long' char data type lower boundaries."]; text_lower_limit(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = % Value == 0 || -1 driver dependent! odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -495,8 +495,8 @@ text_upper_limit(doc) -> text_upper_limit(Config) when is_list(Config) -> {skip,"Consumes too much resources" }. -%% Ref = ?config(connection_ref, Config), -%% Table = ?config(tableName, Config), +%% Ref = proplists:get_value(connection_ref, Config), +%% Table = proplists:get_value(tableName, Config), %% {updated, _} = % Value == 0 || -1 driver dependent! %% odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -521,8 +521,8 @@ text_upper_limit(Config) when is_list(Config) -> binary_char_fixed_lower_limit(doc) -> ["Tests fixed length char data type lower boundaries."]; binary_char_fixed_lower_limit(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), %% Below limit {error, _} = @@ -569,8 +569,8 @@ binary_char_fixed_upper_limit(Config) when is_list(Config) -> postgres -> {skip, "Limit unknown"}; _ -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), %% Upper limit {updated, _} = % Value == 0 || -1 driver dependent! @@ -614,8 +614,8 @@ binary_char_fixed_padding(doc) -> ["Tests that data that is shorter than the given size is padded " "with blanks."]; binary_char_fixed_padding(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), %% Data should be padded with blanks {updated, _} = % Value == 0 || -1 driver dependent! @@ -639,8 +639,8 @@ binary_char_fixed_padding(Config) when is_list(Config) -> binary_varchar_lower_limit(doc) -> ["Tests variable length char data type lower boundaries."]; binary_varchar_lower_limit(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), %% Below limit {error, _} = @@ -680,8 +680,8 @@ binary_varchar_lower_limit(Config) when is_list(Config) -> binary_varchar_upper_limit(doc) -> ["Tests variable length char data type upper boundaries."]; binary_varchar_upper_limit(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), case ?RDBMS of oracle -> @@ -728,8 +728,8 @@ binary_varchar_no_padding(doc) -> ["Tests that data that is shorter than the given max size is not padded " "with blanks."]; binary_varchar_no_padding(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), %% Data should NOT be padded with blanks {updated, _} = % Value == 0 || -1 driver dependent! @@ -751,8 +751,8 @@ binary_varchar_no_padding(Config) when is_list(Config) -> binary_text_lower_limit(doc) -> ["Tests 'long' char data type lower boundaries."]; binary_text_lower_limit(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = % Value == 0 || -1 driver dependent! odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -774,8 +774,8 @@ binary_text_upper_limit(doc) -> binary_text_upper_limit(Config) when is_list(Config) -> {skip,"Consumes too much resources" }. -%% Ref = ?config(connection_ref, Config), -%% Table = ?config(tableName, Config), +%% Ref = proplists:get_value(connection_ref, Config), +%% Table = proplists:get_value(tableName, Config), %% {updated, _} = % Value == 0 || -1 driver dependent! %% odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -805,8 +805,8 @@ tiny_int_lower_limit(Config) when is_list(Config) -> postgres -> {skip, "Type tiniyint not supported"}; _ -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = % Value == 0 || -1 driver dependent! odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -837,8 +837,8 @@ tiny_int_upper_limit(Config) when is_list(Config) -> postgres -> {skip, "Type tiniyint not supported"}; _ -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = % Value == 0 || -1 driver dependent! odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -865,8 +865,8 @@ tiny_int_upper_limit(Config) when is_list(Config) -> small_int_lower_limit(doc) -> ["Tests integer of type smallint."]; small_int_lower_limit(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = % Value == 0 || -1 driver dependent! odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -892,8 +892,8 @@ small_int_lower_limit(Config) when is_list(Config) -> small_int_upper_limit(doc) -> ["Tests integer of type smallint."]; small_int_upper_limit(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = % Value == 0 || -1 driver dependent! odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -918,8 +918,8 @@ small_int_upper_limit(Config) when is_list(Config) -> int_lower_limit(doc) -> ["Tests integer of type int."]; int_lower_limit(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = % Value == 0 || -1 driver dependent! odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -944,8 +944,8 @@ int_lower_limit(Config) when is_list(Config) -> int_upper_limit(doc) -> ["Tests integer of type int."]; int_upper_limit(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = % Value == 0 || -1 driver dependent! odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -970,8 +970,8 @@ int_upper_limit(Config) when is_list(Config) -> big_int_lower_limit(doc) -> ["Tests integer of type bigint"]; big_int_lower_limit(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = % Value == 0 || -1 driver dependent! odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -997,8 +997,8 @@ big_int_lower_limit(Config) when is_list(Config) -> big_int_upper_limit(doc) -> ["Tests integer of type bigint."]; big_int_upper_limit(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = % Value == 0 || -1 driver dependent! odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -1027,8 +1027,8 @@ bit_false(Config) when is_list(Config) -> oracle -> {skip, "Not supported by driver"}; _ -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = % Value == 0 || -1 driver dependent! odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -1059,8 +1059,8 @@ bit_true(Config) when is_list(Config) -> oracle -> {skip, "Not supported by driver"}; _ -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = % Value == 0 || -1 driver dependent! @@ -1088,8 +1088,8 @@ float_lower_limit(doc) -> [""]; float_lower_limit(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), case ?RDBMS of mysql -> @@ -1135,8 +1135,8 @@ float_lower_limit(Config) when is_list(Config) -> float_upper_limit(doc) -> [""]; float_upper_limit(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), case ?RDBMS of mysql -> @@ -1165,8 +1165,8 @@ float_upper_limit(Config) when is_list(Config) -> float_zero(doc) -> ["Test the float value zero."]; float_zero(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = % Value == 0 || -1 driver dependent! odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -1182,8 +1182,8 @@ float_zero(Config) when is_list(Config) -> real_zero(doc) -> ["Test the real value zero."]; real_zero(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), case ?RDBMS of oracle -> @@ -1207,8 +1207,8 @@ dec_long(doc) -> dec_long(suit) -> []; dec_long(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = % Value == 0 || -1 driver dependent! odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -1226,8 +1226,8 @@ dec_double(doc) -> dec_double(suit) -> []; dec_double(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = % Value == 0 || -1 driver dependent! odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -1274,8 +1274,8 @@ dec_bignum(doc) -> dec_bignum(suit) -> []; dec_bignum(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = % Value == 0 || -1 driver dependent! odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -1306,8 +1306,8 @@ num_long(doc) -> num_long(suit) -> []; num_long(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = % Value == 0 || -1 driver dependent! odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -1325,8 +1325,8 @@ num_double(doc) -> num_double(suit) -> []; num_double(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = % Value == 0 || -1 driver dependent! odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -1371,8 +1371,8 @@ num_bignum(doc) -> num_bignum(suit) -> []; num_bignum(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = % Value == 0 || -1 driver dependent! odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -1404,8 +1404,8 @@ utf8(doc) -> utf8(suit) -> []; utf8(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ "(FIELD text)"), @@ -1449,8 +1449,8 @@ nchar(doc) -> nchar(suit) -> []; nchar(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = % Value == 0 || -1 driver dependent! odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -1465,8 +1465,8 @@ nvarchar(doc) -> nvarchar(suit) -> []; nvarchar(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = % Value == 0 || -1 driver dependent! odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -1480,8 +1480,8 @@ timestamp(doc) -> timestamp(suit) -> []; timestamp(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = % Value == 0 || -1 driver dependent! odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ diff --git a/lib/odbc/test/odbc_query_SUITE.erl b/lib/odbc/test/odbc_query_SUITE.erl index 8a5c6bdd73..f48468dc47 100644 --- a/lib/odbc/test/odbc_query_SUITE.erl +++ b/lib/odbc/test/odbc_query_SUITE.erl @@ -158,14 +158,14 @@ init_per_testcase(_Case, Config) -> %% Description: Cleanup after each test case %%-------------------------------------------------------------------- end_per_testcase(_Case, Config) -> - Ref = ?config(connection_ref, Config), + Ref = proplists:get_value(connection_ref, Config), ok = odbc:disconnect(Ref), %% Clean up if needed - Table = ?config(tableName, Config), + Table = proplists:get_value(tableName, Config), {ok, NewRef} = odbc:connect(?RDBMS:connection_string(), odbc_test_lib:platform_options()), odbc:sql_query(NewRef, "DROP TABLE " ++ Table), odbc:disconnect(NewRef), - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -177,7 +177,7 @@ stored_proc(doc)-> stored_proc(Config) when is_list(Config) -> case ?RDBMS of X when X == oracle; X == postgres-> - Ref = ?config(connection_ref, Config), + Ref = proplists:get_value(connection_ref, Config), {updated, _} = odbc:sql_query(Ref, ?RDBMS:stored_proc_integer_out()), @@ -194,8 +194,8 @@ stored_proc(Config) when is_list(Config) -> sql_query(doc)-> ["Test the common cases"]; sql_query(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -239,8 +239,8 @@ select_count(doc) -> " such as first."]; select_count(sute) -> []; select_count(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -258,8 +258,8 @@ select_count(Config) when is_list(Config) -> first(doc) -> ["Tests first/[1,2]"]; first(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -284,8 +284,8 @@ first(Config) when is_list(Config) -> last(doc) -> ["Tests last/[1,2]"]; last(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -310,8 +310,8 @@ last(Config) when is_list(Config) -> next(doc) -> ["Tests next/[1,2]"]; next(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -335,8 +335,8 @@ next(Config) when is_list(Config) -> prev(doc) -> ["Tests prev/[1,2]"]; prev(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -364,8 +364,8 @@ select_next(doc) -> ["Tests select/[4,5] with CursorRelation = next "]; select_next(suit) -> []; select_next(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -405,8 +405,8 @@ select_relative(doc) -> ["Tests select/[4,5] with CursorRelation = relative "]; select_relative(suit) -> []; select_relative(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -446,8 +446,8 @@ select_absolute(doc) -> ["Tests select/[4,5] with CursorRelation = absolute "]; select_absolute(suit) -> []; select_absolute(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -479,8 +479,8 @@ select_absolute(Config) when is_list(Config) -> create_table_twice(doc) -> ["Test what happens if you try to create the same table twice."]; create_table_twice(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -497,8 +497,8 @@ create_table_twice(Config) when is_list(Config) -> delete_table_twice(doc) -> ["Test what happens if you try to delete the same table twice."]; delete_table_twice(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -514,8 +514,8 @@ duplicate_key(doc) -> ["Test what happens if you try to use the same key twice"]; duplicate_key(suit) -> []; duplicate_key(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -535,8 +535,8 @@ not_connection_owner(doc) -> ["Test what happens if a process that did not start the connection" " tries to acess it."]; not_connection_owner(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), spawn_link(?MODULE, not_owner, [self(), Ref, Table]), @@ -559,7 +559,7 @@ no_result_set(doc) -> ["Tests what happens if you try to use a function that needs an " "associated result set when there is none."]; no_result_set(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), + Ref = proplists:get_value(connection_ref, Config), {error, result_set_does_not_exist} = odbc:first(Ref), {error, result_set_does_not_exist} = odbc:last(Ref), @@ -575,8 +575,8 @@ no_result_set(Config) when is_list(Config) -> query_error(doc) -> ["Test what happens if there is an error in the query."]; query_error(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -598,8 +598,8 @@ multiple_select_result_sets(doc) -> multiple_select_result_sets(Config) when is_list(Config) -> case ?RDBMS of sqlserver -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -632,8 +632,8 @@ multiple_mix_result_sets(doc) -> multiple_mix_result_sets(Config) when is_list(Config) -> case ?RDBMS of sqlserver -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -663,8 +663,8 @@ multiple_result_sets_error(doc) -> multiple_result_sets_error(Config) when is_list(Config) -> case ?RDBMS of sqlserver -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -696,8 +696,8 @@ param_insert_tiny_int(doc)-> param_insert_tiny_int(Config) when is_list(Config) -> case ?RDBMS of sqlserver -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -729,8 +729,8 @@ param_insert_tiny_int(Config) when is_list(Config) -> param_insert_small_int(doc)-> ["Test insertion of small ints by parameterized queries."]; param_insert_small_int(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -759,8 +759,8 @@ param_insert_small_int(Config) when is_list(Config) -> param_insert_int(doc)-> ["Test insertion of ints by parameterized queries."]; param_insert_int(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -789,8 +789,8 @@ param_insert_int(Config) when is_list(Config) -> param_insert_integer(doc)-> ["Test insertion of integers by parameterized queries."]; param_insert_integer(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -819,8 +819,8 @@ param_insert_integer(Config) when is_list(Config) -> param_insert_decimal(doc)-> ["Test insertion of decimal numbers by parameterized queries."]; param_insert_decimal(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -868,8 +868,8 @@ param_insert_decimal(Config) when is_list(Config) -> param_insert_numeric(doc)-> ["Test insertion of numeric numbers by parameterized queries."]; param_insert_numeric(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -917,8 +917,8 @@ param_insert_numeric(Config) when is_list(Config) -> param_insert_char(doc)-> ["Test insertion of fixed length string by parameterized queries."]; param_insert_char(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -951,8 +951,8 @@ param_insert_char(Config) when is_list(Config) -> param_insert_character(doc)-> ["Test insertion of fixed length string by parameterized queries."]; param_insert_character(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -986,8 +986,8 @@ param_insert_character(Config) when is_list(Config) -> param_insert_char_varying(doc)-> ["Test insertion of variable length strings by parameterized queries."]; param_insert_char_varying(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -1021,8 +1021,8 @@ param_insert_char_varying(Config) when is_list(Config) -> param_insert_character_varying(doc)-> ["Test insertion of variable length strings by parameterized queries."]; param_insert_character_varying(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -1056,8 +1056,8 @@ param_insert_character_varying(Config) when is_list(Config) -> param_insert_float(doc)-> ["Test insertion of floats by parameterized queries."]; param_insert_float(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -1093,8 +1093,8 @@ param_insert_float(Config) when is_list(Config) -> param_insert_real(doc)-> ["Test insertion of real numbers by parameterized queries."]; param_insert_real(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -1132,8 +1132,8 @@ param_insert_real(Config) when is_list(Config) -> param_insert_double(doc)-> ["Test insertion of doubles by parameterized queries."]; param_insert_double(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -1169,8 +1169,8 @@ param_insert_double(Config) when is_list(Config) -> param_insert_mix(doc)-> ["Test insertion of a mixture of datatypes by parameterized queries."]; param_insert_mix(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -1194,8 +1194,8 @@ param_insert_mix(Config) when is_list(Config) -> param_update(doc)-> ["Test parameterized update query."]; param_update(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -1228,8 +1228,8 @@ delete_nonexisting_row(doc) -> % OTP-5759 ["Make a delete...where with false conditions (0 rows deleted). ", "This used to give an error message (see ticket OTP-5759)."]; delete_nonexisting_row(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, "CREATE TABLE " ++ Table @@ -1256,8 +1256,8 @@ delete_nonexisting_row(Config) when is_list(Config) -> param_delete(doc) -> ["Test parameterized delete query."]; param_delete(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -1289,8 +1289,8 @@ param_delete(Config) when is_list(Config) -> param_select(doc) -> ["Test parameterized select query."]; param_select(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -1317,8 +1317,8 @@ param_select(Config) when is_list(Config) -> param_select_empty_params(doc) -> ["Test parameterized select query with no parameters."]; param_select_empty_params(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -1345,8 +1345,8 @@ param_select_empty_params(Config) when is_list(Config) -> param_delete_empty_params(doc) -> ["Test parameterized delete query with no parameters."]; param_delete_empty_params(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -1377,8 +1377,8 @@ param_delete_empty_params(Config) when is_list(Config) -> describe_integer(doc) -> ["Test describe_table/[2,3] for integer columns."]; describe_integer(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -1394,8 +1394,8 @@ describe_integer(Config) when is_list(Config) -> describe_string(doc) -> ["Test describe_table/[2,3] for string columns."]; describe_string(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -1413,8 +1413,8 @@ describe_string(Config) when is_list(Config) -> describe_floating(doc) -> ["Test describe_table/[2,3] for floting columns."]; describe_floating(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -1432,8 +1432,8 @@ describe_dec_num(doc) -> ["Test describe_table/[2,3] for decimal and numerical columns"]; describe_dec_num(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -1451,8 +1451,8 @@ describe_timestamp(doc) -> ["Test describe_table/[2,3] for tinmestap columns"]; describe_timestamp(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = % Value == 0 || -1 driver dependent! odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -1468,8 +1468,8 @@ describe_no_such_table(doc) -> ["Test what happens if you try to describe a table that does not exist."]; describe_no_such_table(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {error, _ } = odbc:describe_table(Ref, Table), ok. diff --git a/lib/odbc/test/odbc_start_SUITE.erl b/lib/odbc/test/odbc_start_SUITE.erl index 670e498142..ff89a22f3d 100644 --- a/lib/odbc/test/odbc_start_SUITE.erl +++ b/lib/odbc/test/odbc_start_SUITE.erl @@ -89,7 +89,7 @@ init_per_testcase(_TestCase, Config0) -> %% Description: Cleanup after each test case %%-------------------------------------------------------------------- end_per_testcase(_TestCase, Config) -> - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), case Dog of undefined -> ok; -- cgit v1.2.3 From 63551bf2917dce40c8003d7aec05557be62d08bd Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Mon, 27 Jun 2016 15:52:27 +0200 Subject: odbc: Replace test_server with ct eqvivalents --- lib/odbc/test/odbc_connect_SUITE.erl | 44 ++++++++++++++---------------- lib/odbc/test/odbc_data_type_SUITE.erl | 49 ++++++++++++++++------------------ lib/odbc/test/odbc_query_SUITE.erl | 24 ++++++++--------- lib/odbc/test/odbc_start_SUITE.erl | 26 +++++++----------- lib/odbc/test/odbc_test_lib.erl | 6 ++--- 5 files changed, 66 insertions(+), 83 deletions(-) diff --git a/lib/odbc/test/odbc_connect_SUITE.erl b/lib/odbc/test/odbc_connect_SUITE.erl index 6cbce7ceb9..d43a81f2cc 100644 --- a/lib/odbc/test/odbc_connect_SUITE.erl +++ b/lib/odbc/test/odbc_connect_SUITE.erl @@ -89,6 +89,7 @@ init_per_suite(Config) when is_list(Config) -> [{auto_commit, off}] ++ odbc_test_lib:platform_options()) of {ok, Ref} -> odbc:disconnect(Ref), + ct:timetrap(?default_timeout), [{tableName, odbc_test_lib:unique_table_name()} | Config]; _ -> {skip, "ODBC is not properly setup"} @@ -129,11 +130,8 @@ init_per_testcase(_TestCase, Config) -> init_per_testcase_common(Config). init_per_testcase_common(Config) -> - test_server:format("ODBCINI = ~p~n", [os:getenv("ODBCINI")]), - Dog = test_server:timetrap(?default_timeout), - Temp = lists:keydelete(connection_ref, 1, Config), - NewConfig = lists:keydelete(watchdog, 1, Temp), - [{watchdog, Dog} | NewConfig]. + ct:pal("ODBCINI = ~p~n", [os:getenv("ODBCINI")]), + lists:keydelete(connection_ref, 1, Config). %%-------------------------------------------------------------------- %% Function: end_per_testcase(Case, Config) -> _ @@ -157,9 +155,7 @@ end_per_testcase_common(Config) -> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), odbc_test_lib:platform_options()), Result = odbc:sql_query(Ref, "DROP TABLE " ++ Table), io:format("Drop table: ~p ~p~n", [Table, Result]), - odbc:disconnect(Ref), - Dog = proplists:get_value(watchdog, Config), - test_server:timetrap_cancel(Dog). + odbc:disconnect(Ref). %%------------------------------------------------------------------------- %% Test cases starts here. @@ -259,7 +255,7 @@ not_exist_db(_Config) -> {error, _} = odbc:connect("DSN=foo;UID=bar;PWD=foobar", odbc_test_lib:platform_options()), %% So that the odbc control server can be stoped "in the correct way" - test_server:sleep(100). + ct:sleep(100). %%------------------------------------------------------------------------- no_c_executable(doc) -> @@ -301,7 +297,7 @@ port_dies(_Config) -> %% Wait for exit_status from port 5000 ms (will not get a exit %% status in this case), then wait a little longer to make sure %% the port and the controlprocess has had time to terminate. - test_server:sleep(10000), + ct:sleep(10000), undefined = process_info(Ref, status); [] -> ct:fail([erlang:port_info(P, name) || P <- erlang:ports()]) @@ -319,7 +315,7 @@ control_process_dies(_Config) -> [Port] -> {connected, Ref} = erlang:port_info(Port, connected), exit(Ref, kill), - test_server:sleep(500), + ct:sleep(500), undefined = erlang:port_info(Port, connected); %% Check for c-program still running, how? [] -> @@ -344,7 +340,7 @@ client_dies_normal(Config) when is_list(Config) -> {'DOWN', MonitorReference, _Type, _Object, _Info} -> ok after 5000 -> - test_server:fail(control_process_not_stopped) + ct:fail(control_process_not_stopped) end. client_normal(Pid) -> @@ -375,7 +371,7 @@ client_dies_timeout(Config) when is_list(Config) -> {'DOWN', MonitorReference, _Type, _Object, _Info} -> ok after 5000 -> - test_server:fail(control_process_not_stopped) + ct:fail(control_process_not_stopped) end. client_timeout(Pid) -> @@ -406,7 +402,7 @@ client_dies_error(Config) when is_list(Config) -> {'DOWN', MonitorReference, _Type, _Object, _Info} -> ok after 5000 -> - test_server:fail(control_process_not_stopped) + ct:fail(control_process_not_stopped) end. client_error(Pid) -> @@ -499,7 +495,7 @@ update_table_timeout(Table, TimeOut, Pid) -> {'EXIT', timeout} -> Pid ! timout_occurred; {updated, 1} -> - test_server:fail(database_locker_failed) + ct:fail(database_locker_failed) end, receive @@ -578,7 +574,7 @@ loop_many_timouts(Ref, UpdateQuery, TimeOut) -> {'EXIT',timeout} -> loop_many_timouts(Ref, UpdateQuery, TimeOut); {updated, 1} -> - test_server:fail(database_locker_failed); + ct:fail(database_locker_failed); {error, connection_closed} -> ok end. @@ -673,9 +669,9 @@ loop_timout_reset(Ref, UpdateQuery, TimeOut, NumTimeouts) -> loop_timout_reset(Ref, UpdateQuery, TimeOut, NumTimeouts - 1); {updated, 1} -> - test_server:fail(database_locker_failed); + ct:fail(database_locker_failed); {error, connection_closed} -> - test_server:fail(connection_closed_premature) + ct:fail(connection_closed_premature) end. %%------------------------------------------------------------------------- @@ -710,7 +706,7 @@ disconnect_on_timeout(Config) when is_list(Config) -> ok -> ok = odbc:commit(Ref, commit); nok -> - test_server:fail(database_locker_failed) + ct:fail(database_locker_failed) end. update_table_disconnect_on_timeout(Table, TimeOut, Pid) -> @@ -774,10 +770,10 @@ disable_scrollable_cursors(Config) when is_list(Config) -> NextResult = ?RDBMS:selected_ID(1, next), - test_server:format("Expected: ~p~n", [NextResult]), + ct:pal("Expected: ~p~n", [NextResult]), Result = odbc:next(Ref), - test_server:format("Got: ~p~n", [Result]), + ct:pal("Got: ~p~n", [Result]), NextResult = Result, {error, scrollable_cursors_disabled} = odbc:first(Ref), @@ -842,21 +838,21 @@ api_missuse(Config) when is_list(Config)-> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), odbc_test_lib:platform_options()), %% Serious programming fault, connetion will be shut down gen_server:call(Ref, {self(), foobar, 10}, infinity), - test_server:sleep(10), + ct:sleep(10), undefined = process_info(Ref, status), {ok, Ref2} = odbc:connect(?RDBMS:connection_string(), odbc_test_lib:platform_options()), %% Serious programming fault, connetion will be shut down gen_server:cast(Ref2, {self(), foobar, 10}), - test_server:sleep(10), + ct:sleep(10), undefined = process_info(Ref2, status), {ok, Ref3} = odbc:connect(?RDBMS:connection_string(), odbc_test_lib:platform_options()), %% Could be an innocent misstake the connection lives. Ref3 ! foobar, - test_server:sleep(10), + ct:sleep(10), {status, _} = process_info(Ref3, status). transaction_support_str(mysql) -> diff --git a/lib/odbc/test/odbc_data_type_SUITE.erl b/lib/odbc/test/odbc_data_type_SUITE.erl index d3c530e035..830e05e4f2 100644 --- a/lib/odbc/test/odbc_data_type_SUITE.erl +++ b/lib/odbc/test/odbc_data_type_SUITE.erl @@ -120,6 +120,7 @@ init_per_suite(Config) when is_list(Config) -> false -> case (catch odbc:start()) of ok -> + ct:timetrap(?default_timeout), [{tableName, odbc_test_lib:unique_table_name()}| Config]; _ -> {skip, "ODBC not startable"} @@ -191,23 +192,22 @@ init_per_testcase(Case, Config) -> common_init_per_testcase(Case, Config) -> PlatformOptions = odbc_test_lib:platform_options(), - case atom_to_list(Case) of - "binary" ++ _ -> - {ok, Ref} = odbc:connect(?RDBMS:connection_string(), - [{binary_strings, on}] ++ PlatformOptions); - LCase when LCase == "utf8"; - LCase == "nchar"; - LCase == "nvarchar" -> - {ok, Ref} = odbc:connect(?RDBMS:connection_string(), - [{binary_strings, on}] ++ PlatformOptions); - _ -> - {ok, Ref} = odbc:connect(?RDBMS:connection_string(), PlatformOptions) - end, + {ok, Ref} = + case atom_to_list(Case) of + "binary" ++ _ -> + odbc:connect(?RDBMS:connection_string(), + [{binary_strings, on}] ++ PlatformOptions); + LCase when LCase == "utf8"; + LCase == "nchar"; + LCase == "nvarchar" -> + odbc:connect(?RDBMS:connection_string(), + [{binary_strings, on}] ++ PlatformOptions); + _ -> + odbc:connect(?RDBMS:connection_string(), PlatformOptions) + end, odbc_test_lib:strict(Ref, ?RDBMS), - Dog = test_server:timetrap(?default_timeout), - Temp = lists:keydelete(connection_ref, 1, Config), - NewConfig = lists:keydelete(watchdog, 1, Temp), - [{watchdog, Dog}, {connection_ref, Ref} | NewConfig]. + NewConfig = lists:keydelete(connection_ref, 1, Config), + [{connection_ref, Ref} | NewConfig]. is_fixed_upper_limit(mysql) -> false; @@ -237,10 +237,7 @@ end_per_testcase(_TestCase, Config) -> Table = proplists:get_value(tableName, Config), {ok, NewRef} = odbc:connect(?RDBMS:connection_string(), odbc_test_lib:platform_options()), odbc:sql_query(NewRef, "DROP TABLE " ++ Table), - odbc:disconnect(NewRef), - Dog = proplists:get_value(watchdog, Config), - test_server:timetrap_cancel(Dog), - ok. + odbc:disconnect(NewRef). %%------------------------------------------------------------------------- %% Test cases starts here. @@ -1427,19 +1424,19 @@ utf8(Config) when is_list(Config) -> end, Latin1Data), - test_server:format("UnicodeIn: ~p ~n",[UnicodeIn]), + ct:pal("UnicodeIn: ~p ~n",[UnicodeIn]), {updated, _} = odbc:param_query(Ref,"INSERT INTO " ++ Table ++ "(FIELD) values(?)", [{{sql_varchar,50}, UnicodeIn}]), {selected,_,UnicodeOut} = odbc:sql_query(Ref,"SELECT * FROM " ++ Table), - test_server:format("UnicodeOut: ~p~n", [UnicodeOut]), + ct:pal("UnicodeOut: ~p~n", [UnicodeOut]), Result = lists:map(fun({Char}) -> unicode:characters_to_list(Char,utf8) end, UnicodeOut), - test_server:format("Result: ~p ~n", [Result]), + ct:pal("Result: ~p ~n", [Result]), Latin1Data = Result. %%------------------------------------------------------------------------ @@ -1522,21 +1519,21 @@ w_char_support(Ref, Table, CharType, Size) -> end, Latin1Data), - test_server:format("UnicodeIn (utf 16): ~p ~n",[UnicodeIn]), + ct:pal("UnicodeIn (utf 16): ~p ~n",[UnicodeIn]), {updated, _} = odbc:param_query(Ref, "INSERT INTO " ++ Table ++ "(FIELD) values(?)", [{{CharType, Size},UnicodeIn}]), {selected,_,UnicodeOut} = odbc:sql_query(Ref,"SELECT * FROM " ++ Table), - test_server:format("UnicodeOut: ~p~n", [UnicodeOut]), + ct:pal("UnicodeOut: ~p~n", [UnicodeOut]), PadResult = lists:map(fun({Unicode}) -> unicode:characters_to_list(Unicode,{utf16,little}) end, UnicodeOut), - test_server:format("Result: ~p~n", [PadResult]), + ct:pal("Result: ~p~n", [PadResult]), Result = lists:map(fun(Str) -> string:strip(Str) end, PadResult), diff --git a/lib/odbc/test/odbc_query_SUITE.erl b/lib/odbc/test/odbc_query_SUITE.erl index f48468dc47..a49cd74a43 100644 --- a/lib/odbc/test/odbc_query_SUITE.erl +++ b/lib/odbc/test/odbc_query_SUITE.erl @@ -113,6 +113,7 @@ init_per_suite(Config) when is_list(Config) -> false -> case (catch odbc:start()) of ok -> + ct:timetrap(?default_timeout), [{tableName, odbc_test_lib:unique_table_name()}| Config]; _ -> {skip, "ODBC not startable"} @@ -144,10 +145,10 @@ end_per_suite(_Config) -> init_per_testcase(_Case, Config) -> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), odbc_test_lib:platform_options()), odbc_test_lib:strict(Ref, ?RDBMS), - Dog = test_server:timetrap(?default_timeout), - Temp = lists:keydelete(connection_ref, 1, Config), - NewConfig = lists:keydelete(watchdog, 1, Temp), - [{watchdog, Dog}, {connection_ref, Ref} | NewConfig]. + + NewConfig = lists:keydelete(connection_ref, 1, Config), + + [{connection_ref, Ref} | NewConfig]. %%-------------------------------------------------------------------- %% Function: end_per_testcase(Case, Config) -> _ @@ -164,10 +165,7 @@ end_per_testcase(_Case, Config) -> Table = proplists:get_value(tableName, Config), {ok, NewRef} = odbc:connect(?RDBMS:connection_string(), odbc_test_lib:platform_options()), odbc:sql_query(NewRef, "DROP TABLE " ++ Table), - odbc:disconnect(NewRef), - Dog = proplists:get_value(watchdog, Config), - test_server:timetrap_cancel(Dog), - ok. + odbc:disconnect(NewRef). %%------------------------------------------------------------------------- %% Test cases starts here. @@ -1080,7 +1078,7 @@ param_insert_float(Config) when is_list(Config) -> true -> ok; false -> - test_server:fail(float_numbers_do_not_match) + ct:fail(float_numbers_do_not_match) end, {'EXIT',{badarg,odbc,param_query,'Params'}} = @@ -1119,7 +1117,7 @@ param_insert_real(Config) when is_list(Config) -> true -> ok; false -> - test_server:fail(real_numbers_do_not_match) + ct:fail(real_numbers_do_not_match) end, {'EXIT',{badarg,odbc,param_query,'Params'}} = @@ -1156,7 +1154,7 @@ param_insert_double(Config) when is_list(Config) -> true -> ok; false -> - test_server:fail(double_numbers_do_not_match) + ct:fail(double_numbers_do_not_match) end, {'EXIT',{badarg,odbc,param_query,'Params'}} = @@ -1481,10 +1479,10 @@ describe_no_such_table(Config) when is_list(Config) -> is_driver_error(Error) -> case is_list(Error) of true -> - test_server:format("Driver error ~p~n", [Error]), + ct:pal("Driver error ~p~n", [Error]), ok; false -> - test_server:fail(Error) + ct:fail(Error) end. is_supported_multiple_resultsets(sqlserver) -> true; diff --git a/lib/odbc/test/odbc_start_SUITE.erl b/lib/odbc/test/odbc_start_SUITE.erl index ff89a22f3d..3e74a343a6 100644 --- a/lib/odbc/test/odbc_start_SUITE.erl +++ b/lib/odbc/test/odbc_start_SUITE.erl @@ -49,6 +49,7 @@ init_per_suite(Config) -> _ -> %% Make sure odbc is not already started odbc:stop(), + ct:timetrap(?TIMEOUT), [{tableName, odbc_test_lib:unique_table_name()} | Config] end end. @@ -74,11 +75,9 @@ end_per_suite(_Config) -> %% variable, but should NOT alter/remove any existing entries. %% Description: Initialization before each test case %%-------------------------------------------------------------------- -init_per_testcase(_TestCase, Config0) -> - test_server:format("ODBCINI = ~p~n", [os:getenv("ODBCINI")]), - Config = lists:keydelete(watchdog, 1, Config0), - Dog = test_server:timetrap(?TIMEOUT), - [{watchdog, Dog} | Config]. +init_per_testcase(_TestCase, Config) -> + ct:pal("ODBCINI = ~p~n", [os:getenv("ODBCINI")]), + Config. %%-------------------------------------------------------------------- %% Function: end_per_testcase(TestCase, Config) -> _ @@ -88,15 +87,8 @@ init_per_testcase(_TestCase, Config0) -> %% A list of key/value pairs, holding the test case configuration. %% Description: Cleanup after each test case %%-------------------------------------------------------------------- -end_per_testcase(_TestCase, Config) -> - Dog = proplists:get_value(watchdog, Config), - case Dog of - undefined -> - ok; - _ -> - test_server:timetrap_cancel(Dog) - end. - +end_per_testcase(_TestCase, _Config) -> + ok. %%-------------------------------------------------------------------- %% Function: all(Clause) -> TestCases %% Clause - atom() - suite | doc @@ -151,9 +143,9 @@ start(Config) when is_list(Config) -> start_odbc(transient), start_odbc(permanent); {error, odbc_not_started} -> - test_server:fail(start_failed); + ct:fail(start_failed); Error -> - test_server:format("Connection failed: ~p~n", [Error]), + ct:pal("Connection failed: ~p~n", [Error]), {skip, "ODBC is not properly setup"} end. @@ -164,7 +156,7 @@ start_odbc(Type) -> ok = odbc:disconnect(Ref), odbc:stop(); {error, odbc_not_started} -> - test_server:fail(start_failed) + ct:fail(start_failed) end. diff --git a/lib/odbc/test/odbc_test_lib.erl b/lib/odbc/test/odbc_test_lib.erl index 37c2249303..cf82d4d32a 100644 --- a/lib/odbc/test/odbc_test_lib.erl +++ b/lib/odbc/test/odbc_test_lib.erl @@ -61,13 +61,13 @@ odbc_check() -> end. check_row_count(Count, Count) -> - test_server:format("Correct row count Count: ~p~n", [Count]), + ct:pal("Correct row count Count: ~p~n", [Count]), true; check_row_count(_, undefined) -> - test_server:format("Undefined row count ~n", []), + ct:pal("Undefined row count ~n", []), true; check_row_count(Expected, Count) -> - test_server:format("Incorrect row count Expected ~p Got ~p~n", + ct:pal("Incorrect row count Expected ~p Got ~p~n", [Expected, Count]), false. -- cgit v1.2.3 From 436d0e3300a64daede0f45dc52920161a5423a0b Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Mon, 27 Jun 2016 16:34:59 +0200 Subject: odbc: Convert doc clauses form test_server to ct --- lib/odbc/test/odbc_connect_SUITE.erl | 101 ++++++++--------- lib/odbc/test/odbc_data_type_SUITE.erl | 148 +++++++++++-------------- lib/odbc/test/odbc_query_SUITE.erl | 192 ++++++++++++++++----------------- lib/odbc/test/odbc_start_SUITE.erl | 8 +- 4 files changed, 215 insertions(+), 234 deletions(-) diff --git a/lib/odbc/test/odbc_connect_SUITE.erl b/lib/odbc/test/odbc_connect_SUITE.erl index d43a81f2cc..261dfc6f20 100644 --- a/lib/odbc/test/odbc_connect_SUITE.erl +++ b/lib/odbc/test/odbc_connect_SUITE.erl @@ -160,8 +160,8 @@ end_per_testcase_common(Config) -> %%------------------------------------------------------------------------- %% Test cases starts here. %%------------------------------------------------------------------------- -commit(doc)-> - ["Test the use of explicit commit"]; +commit()-> + [{doc,"Test the use of explicit commit"}]. commit(Config) -> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), [{auto_commit, off}] ++ odbc_test_lib:platform_options()), @@ -200,8 +200,8 @@ commit(Config) -> ok = odbc:disconnect(Ref). %%------------------------------------------------------------------------- -rollback(doc)-> - ["Test the use of explicit rollback"]; +rollback()-> + [{doc,"Test the use of explicit rollback"}]. rollback(Config) -> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), [{auto_commit, off}] ++ odbc_test_lib:platform_options()), @@ -239,8 +239,8 @@ rollback(Config) -> ok = odbc:disconnect(Ref). %%------------------------------------------------------------------------- -not_explicit_commit(doc) -> - ["Test what happens if you try using commit on a auto_commit connection."]; +not_explicit_commit() -> + [{doc,"Test what happens if you try using commit on a auto_commit connection."}]. not_explicit_commit(_Config) -> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), [{auto_commit, on}] ++ @@ -249,8 +249,8 @@ not_explicit_commit(_Config) -> ok = odbc:disconnect(Ref). %%------------------------------------------------------------------------- -not_exist_db(doc) -> - ["Tests valid data format but invalid data in the connection parameters."]; +not_exist_db() -> + [{doc,"Tests valid data format but invalid data in the connection parameters."}]. not_exist_db(_Config) -> {error, _} = odbc:connect("DSN=foo;UID=bar;PWD=foobar", odbc_test_lib:platform_options()), @@ -258,8 +258,8 @@ not_exist_db(_Config) -> ct:sleep(100). %%------------------------------------------------------------------------- -no_c_executable(doc) -> - "Test what happens if the port-program can not be found"; +no_c_executable() -> + [{doc,"Test what happens if the port-program can not be found"}]. no_c_executable(_Config) -> process_flag(trap_exit, true), Dir = filename:nativename(filename:join(code:priv_dir(odbc), @@ -284,8 +284,8 @@ no_c_executable(_Config) -> end. %%------------------------------------------------------------------------ -port_dies(doc) -> - "Tests what happens if the port program dies"; +port_dies() -> + [{doc,"Tests what happens if the port program dies"}]. port_dies(_Config) -> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), odbc_test_lib:platform_options()), {status, _} = process_info(Ref, status), @@ -305,8 +305,8 @@ port_dies(_Config) -> %%------------------------------------------------------------------------- -control_process_dies(doc) -> - "Tests what happens if the Erlang control process dies"; +control_process_dies() -> + [{doc,"Tests what happens if the Erlang control process dies"}]. control_process_dies(_Config) -> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), odbc_test_lib:platform_options()), process_flag(trap_exit, true), @@ -323,8 +323,8 @@ control_process_dies(_Config) -> end. %%------------------------------------------------------------------------- -client_dies_normal(doc) -> - ["Client dies with reason normal."]; +client_dies_normal() -> + [{doc,"Client dies with reason normal."}]. client_dies_normal(Config) when is_list(Config) -> Pid = spawn(?MODULE, client_normal, [self()]), @@ -354,8 +354,8 @@ client_normal(Pid) -> %%------------------------------------------------------------------------- -client_dies_timeout(doc) -> - ["Client dies with reason timeout."]; +client_dies_timeout() -> + [{doc,"Client dies with reason timeout."}]. client_dies_timeout(Config) when is_list(Config) -> Pid = spawn(?MODULE, client_timeout, [self()]), @@ -385,8 +385,8 @@ client_timeout(Pid) -> %%------------------------------------------------------------------------- -client_dies_error(doc) -> - ["Client dies with reason error."]; +client_dies_error() -> + [{doc,"Client dies with reason error."}]. client_dies_error(Config) when is_list(Config) -> Pid = spawn(?MODULE, client_error, [self()]), @@ -416,8 +416,8 @@ client_error(Pid) -> %%------------------------------------------------------------------------- -connect_timeout(doc) -> - ["Test the timeout for the connect function."]; +connect_timeout() -> + [{doc,"Test the timeout for the connect function."}]. connect_timeout(Config) when is_list(Config) -> {'EXIT',timeout} = (catch odbc:connect(?RDBMS:connection_string(), [{timeout, 0}] ++ @@ -427,9 +427,9 @@ connect_timeout(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -connect_port_timeout(doc) -> - ["Test the timeout for the port program to connect back to the odbc " - "application within the connect function."]; +connect_port_timeout() -> + [{"Test the timeout for the port program to connect back to the odbc " + "application within the connect function."}]. connect_port_timeout(Config) when is_list(Config) -> %% Application environment var 'port_timeout' has been set to 0 by %% init_per_testcase/2. @@ -437,9 +437,9 @@ connect_port_timeout(Config) when is_list(Config) -> odbc_test_lib:platform_options()). %%------------------------------------------------------------------------- -timeout(doc) -> - ["Test that timeouts don't cause unwanted behavior sush as receiving" - " an anwser to a previously tiemed out query."]; +timeout() -> + [{"Test that timeouts don't cause unwanted behavior sush as receiving" + " an anwser to a previously tiemed out query."}]. timeout(Config) when is_list(Config) -> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), @@ -520,9 +520,9 @@ update_table_timeout(Table, TimeOut, Pid) -> ok = odbc:disconnect(Ref). %%------------------------------------------------------------------------- -many_timeouts(doc) -> - ["Tests that many consecutive timeouts lead to that the connection " - "is shutdown."]; +many_timeouts() -> + [{doc, "Tests that many consecutive timeouts lead to that the connection " + "is shutdown."}]. many_timeouts(Config) when is_list(Config) -> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), [{auto_commit, off}] ++ odbc_test_lib:platform_options()), @@ -579,9 +579,9 @@ loop_many_timouts(Ref, UpdateQuery, TimeOut) -> ok end. %%------------------------------------------------------------------------- -timeout_reset(doc) -> - ["Check that the number of consecutive timouts is reset to 0 when " - "a successful call to the database is made."]; +timeout_reset() -> + [{doc, "Check that the number of consecutive timouts is reset to 0 when " + "a successful call to the database is made."}]. timeout_reset(Config) when is_list(Config) -> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), [{auto_commit, off}] ++ odbc_test_lib:platform_options()), @@ -676,8 +676,8 @@ loop_timout_reset(Ref, UpdateQuery, TimeOut, NumTimeouts) -> %%------------------------------------------------------------------------- -disconnect_on_timeout(doc) -> - ["Check that disconnect after a time out works properly"]; +disconnect_on_timeout() -> + [{doc,"Check that disconnect after a time out works properly"}]. disconnect_on_timeout(Config) when is_list(Config) -> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), @@ -724,9 +724,9 @@ update_table_disconnect_on_timeout(Table, TimeOut, Pid) -> end. %%------------------------------------------------------------------------- -connection_closed(doc) -> - ["Checks that you get an appropriate error message if you try to" - " use a connection that has been closed"]; +connection_closed() -> + [{doc, "Checks that you get an appropriate error message if you try to" + " use a connection that has been closed"}]. connection_closed(Config) when is_list(Config) -> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), odbc_test_lib:platform_options()), @@ -750,8 +750,8 @@ connection_closed(Config) when is_list(Config) -> {error, connection_closed} = odbc:commit(Ref, commit). %%------------------------------------------------------------------------- -disable_scrollable_cursors(doc) -> - ["Test disabling of scrollable cursors."]; +disable_scrollable_cursors() -> + [{doc,"Test disabling of scrollable cursors."}]. disable_scrollable_cursors(Config) when is_list(Config) -> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), [{scrollable_cursors, off}]), @@ -787,9 +787,9 @@ disable_scrollable_cursors(Config) when is_list(Config) -> {selected, _ColNames,[]} = odbc:select(Ref, next, 1). %%------------------------------------------------------------------------- -return_rows_as_lists(doc)-> - ["Test the option that a row may be returned as a list instead " - "of a tuple. Too be somewhat backward compatible."]; +return_rows_as_lists()-> + [{doc,"Test the option that a row may be returned as a list instead " + "of a tuple. Too be somewhat backward compatible."}]. return_rows_as_lists(Config) when is_list(Config) -> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), [{tuple_row, off}] ++ odbc_test_lib:platform_options()), @@ -831,8 +831,8 @@ return_rows_as_lists(Config) when is_list(Config) -> %%------------------------------------------------------------------------- -api_missuse(doc)-> - ["Test that behaviour of the control process if the api is abused"]; +api_missuse()-> + [{doc,"Test that behaviour of the control process if the api is abused"}]. api_missuse(Config) when is_list(Config)-> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), odbc_test_lib:platform_options()), @@ -862,10 +862,11 @@ transaction_support_str(_) -> %%------------------------------------------------------------------------- -extended_errors(doc)-> - ["Test the extended errors connection option: When off; the old behaviour of just an error " - "string is returned on error. When on, the error string is replaced by a 3 element tuple " - "that also exposes underlying ODBC provider error codes."]; +extended_errors()-> + [{doc, + "Test the extended errors connection option: When off; the old behaviour of just an error " + "string is returned on error. When on, the error string is replaced by a 3 element tuple " + "that also exposes underlying ODBC provider error codes."}]. extended_errors(Config) when is_list(Config)-> Table = proplists:get_value(tableName, Config), {ok, Ref} = odbc:connect(?RDBMS:connection_string(), odbc_test_lib:platform_options()), diff --git a/lib/odbc/test/odbc_data_type_SUITE.erl b/lib/odbc/test/odbc_data_type_SUITE.erl index 830e05e4f2..a3a4bc78eb 100644 --- a/lib/odbc/test/odbc_data_type_SUITE.erl +++ b/lib/odbc/test/odbc_data_type_SUITE.erl @@ -243,8 +243,8 @@ end_per_testcase(_TestCase, Config) -> %% Test cases starts here. %%------------------------------------------------------------------------- -char_fixed_lower_limit(doc) -> - ["Tests fixed length char data type lower boundaries."]; +char_fixed_lower_limit() -> + [{doc,"Tests fixed length char data type lower boundaries."}]. char_fixed_lower_limit(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -282,8 +282,8 @@ char_fixed_lower_limit(Config) when is_list(Config) -> %%------------------------------------------------------------------------- -char_fixed_upper_limit(doc) -> - ["Tests fixed length char data type upper boundaries."]; +char_fixed_upper_limit() -> + [{doc,"Tests fixed length char data type upper boundaries."}]. char_fixed_upper_limit(Config) when is_list(Config) -> case ?RDBMS of @@ -330,9 +330,9 @@ char_fixed_upper_limit(Config) when is_list(Config) -> %%------------------------------------------------------------------------- -char_fixed_padding(doc) -> - ["Tests that data that is shorter than the given size is padded " - "with blanks."]; +char_fixed_padding() -> + [{doc, "Tests that data that is shorter than the given size is padded " + "with blanks."}]. char_fixed_padding(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -356,8 +356,8 @@ char_fixed_padding(Config) when is_list(Config) -> %%------------------------------------------------------------------------- -varchar_lower_limit(doc) -> - ["Tests variable length char data type lower boundaries."]; +varchar_lower_limit() -> + [{doc,"Tests variable length char data type lower boundaries."}]. varchar_lower_limit(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -394,8 +394,8 @@ varchar_lower_limit(Config) when is_list(Config) -> %%------------------------------------------------------------------------- -varchar_upper_limit(doc) -> - ["Tests variable length char data type upper boundaries."]; +varchar_upper_limit() -> + [{doc,"Tests variable length char data type upper boundaries."}]. varchar_upper_limit(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -442,9 +442,9 @@ varchar_upper_limit(Config) when is_list(Config) -> end. %%------------------------------------------------------------------------- -varchar_no_padding(doc) -> - ["Tests that data that is shorter than the given max size is not padded " - "with blanks."]; +varchar_no_padding() -> + [{doc, "Tests that data that is shorter than the given max size is not padded " + "with blanks."}]. varchar_no_padding(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -466,8 +466,8 @@ varchar_no_padding(Config) when is_list(Config) -> %%------------------------------------------------------------------------- -text_lower_limit(doc) -> - ["Tests 'long' char data type lower boundaries."]; +text_lower_limit() -> + [{doc,"Tests 'long' char data type lower boundaries."}]. text_lower_limit(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -487,8 +487,8 @@ text_lower_limit(Config) when is_list(Config) -> %%------------------------------------------------------------------------- -text_upper_limit(doc) -> - []; +text_upper_limit() -> + [{doc,"Tests 'text' char data type upper boundaries."}]. text_upper_limit(Config) when is_list(Config) -> {skip,"Consumes too much resources" }. @@ -515,8 +515,8 @@ text_upper_limit(Config) when is_list(Config) -> %%------------------------------------------------------------------------- -binary_char_fixed_lower_limit(doc) -> - ["Tests fixed length char data type lower boundaries."]; +binary_char_fixed_lower_limit() -> + [{doc,"Tests fixed length char data type lower boundaries."}]. binary_char_fixed_lower_limit(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -558,8 +558,8 @@ binary_char_fixed_lower_limit(Config) when is_list(Config) -> ++ "')"). %%------------------------------------------------------------------------- -binary_char_fixed_upper_limit(doc) -> - ["Tests fixed length char data type upper boundaries."]; +binary_char_fixed_upper_limit() -> + [{doc,"Tests fixed length char data type upper boundaries."}]. binary_char_fixed_upper_limit(Config) when is_list(Config) -> case ?RDBMS of @@ -607,9 +607,9 @@ binary_char_fixed_upper_limit(Config) when is_list(Config) -> %%------------------------------------------------------------------------- -binary_char_fixed_padding(doc) -> - ["Tests that data that is shorter than the given size is padded " - "with blanks."]; +binary_char_fixed_padding() -> + [{doc, "Tests that data that is shorter than the given size is padded " + "with blanks."}]. binary_char_fixed_padding(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -633,8 +633,8 @@ binary_char_fixed_padding(Config) when is_list(Config) -> %%------------------------------------------------------------------------- -binary_varchar_lower_limit(doc) -> - ["Tests variable length char data type lower boundaries."]; +binary_varchar_lower_limit() -> + [{doc,"Tests variable length char data type lower boundaries."}]. binary_varchar_lower_limit(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -674,8 +674,8 @@ binary_varchar_lower_limit(Config) when is_list(Config) -> %%------------------------------------------------------------------------- -binary_varchar_upper_limit(doc) -> - ["Tests variable length char data type upper boundaries."]; +binary_varchar_upper_limit() -> + [{doc,"Tests variable length char data type upper boundaries."}]. binary_varchar_upper_limit(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -721,9 +721,9 @@ binary_varchar_upper_limit(Config) when is_list(Config) -> end. %%------------------------------------------------------------------------- -binary_varchar_no_padding(doc) -> - ["Tests that data that is shorter than the given max size is not padded " - "with blanks."]; +binary_varchar_no_padding() -> + [{doc,"Tests that data that is shorter than the given max size is not padded " + "with blanks."}]. binary_varchar_no_padding(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -745,8 +745,8 @@ binary_varchar_no_padding(Config) when is_list(Config) -> %%------------------------------------------------------------------------- -binary_text_lower_limit(doc) -> - ["Tests 'long' char data type lower boundaries."]; +binary_text_lower_limit() -> + [{doc,"Tests 'long' char data type lower boundaries."}]. binary_text_lower_limit(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -766,8 +766,8 @@ binary_text_lower_limit(Config) when is_list(Config) -> %%------------------------------------------------------------------------- -binary_text_upper_limit(doc) -> - []; +binary_text_upper_limit() -> + [{doc,"Tests text char data type upper boundaries."}]. binary_text_upper_limit(Config) when is_list(Config) -> {skip,"Consumes too much resources" }. @@ -795,8 +795,8 @@ binary_text_upper_limit(Config) when is_list(Config) -> %%------------------------------------------------------------------------- -tiny_int_lower_limit(doc) -> - ["Tests integer of type tinyint."]; +tiny_int_lower_limit() -> + [{doc,"Tests integer of type tinyint."}]. tiny_int_lower_limit(Config) when is_list(Config) -> case ?RDBMS of postgres -> @@ -827,8 +827,8 @@ tiny_int_lower_limit(Config) when is_list(Config) -> %%------------------------------------------------------------------------- -tiny_int_upper_limit(doc) -> - ["Tests integer of type tinyint."]; +tiny_int_upper_limit() -> + [{doc,"Tests integer of type tinyint."}]. tiny_int_upper_limit(Config) when is_list(Config) -> case ?RDBMS of postgres -> @@ -859,8 +859,8 @@ tiny_int_upper_limit(Config) when is_list(Config) -> %%------------------------------------------------------------------------- -small_int_lower_limit(doc) -> - ["Tests integer of type smallint."]; +small_int_lower_limit() -> + [{doc,"Tests integer of type smallint."}]. small_int_lower_limit(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -886,8 +886,8 @@ small_int_lower_limit(Config) when is_list(Config) -> %%------------------------------------------------------------------------- -small_int_upper_limit(doc) -> - ["Tests integer of type smallint."]; +small_int_upper_limit() -> + [{doc,"Tests integer of type smallint."}]. small_int_upper_limit(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -912,8 +912,8 @@ small_int_upper_limit(Config) when is_list(Config) -> ++ "')"). %%------------------------------------------------------------------------- -int_lower_limit(doc) -> - ["Tests integer of type int."]; +int_lower_limit() -> + [{doc,"Tests integer of type int."}]. int_lower_limit(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -938,8 +938,8 @@ int_lower_limit(Config) when is_list(Config) -> %%------------------------------------------------------------------------- -int_upper_limit(doc) -> - ["Tests integer of type int."]; +int_upper_limit() -> + [{doc,"Tests integer of type int."}]. int_upper_limit(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -964,8 +964,8 @@ int_upper_limit(Config) when is_list(Config) -> %%------------------------------------------------------------------------- -big_int_lower_limit(doc) -> - ["Tests integer of type bigint"]; +big_int_lower_limit() -> + [{doc,"Tests integer of type bigint"}]. big_int_lower_limit(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -991,8 +991,8 @@ big_int_lower_limit(Config) when is_list(Config) -> %%------------------------------------------------------------------------- -big_int_upper_limit(doc) -> - ["Tests integer of type bigint."]; +big_int_upper_limit() -> + [{doc,"Tests integer of type bigint."}]. big_int_upper_limit(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -1017,8 +1017,6 @@ big_int_upper_limit(Config) when is_list(Config) -> ++ "')"). %%------------------------------------------------------------------------- -bit_false(doc) -> - [""]; bit_false(Config) when is_list(Config) -> case ?RDBMS of oracle -> @@ -1049,8 +1047,6 @@ bit_false(Config) when is_list(Config) -> %%------------------------------------------------------------------------- -bit_true(doc) -> - [""]; bit_true(Config) when is_list(Config) -> case ?RDBMS of oracle -> @@ -1081,8 +1077,7 @@ bit_true(Config) when is_list(Config) -> end. %%------------------------------------------------------------------------- -float_lower_limit(doc) -> - [""]; + float_lower_limit(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), @@ -1129,8 +1124,7 @@ float_lower_limit(Config) when is_list(Config) -> end. %%------------------------------------------------------------------------- -float_upper_limit(doc) -> - [""]; + float_upper_limit(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -1159,8 +1153,8 @@ float_upper_limit(Config) when is_list(Config) -> end. %%------------------------------------------------------------------------- -float_zero(doc) -> - ["Test the float value zero."]; +float_zero() -> + [{doc,"Test the float value zero."}]. float_zero(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -1176,8 +1170,8 @@ float_zero(Config) when is_list(Config) -> SelectResult = odbc:sql_query(Ref,"SELECT FIELD FROM " ++ Table). %%------------------------------------------------------------------------- -real_zero(doc) -> - ["Test the real value zero."]; +real_zero() -> + [{doc,"Test the real value zero."}]. real_zero(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -1199,8 +1193,6 @@ real_zero(Config) when is_list(Config) -> odbc:sql_query(Ref,"SELECT FIELD FROM " ++ Table) end. %%------------------------------------------------------------------------ -dec_long(doc) -> - [""]; dec_long(suit) -> []; dec_long(Config) when is_list(Config) -> @@ -1218,8 +1210,6 @@ dec_long(Config) when is_list(Config) -> odbc:sql_query(Ref,"SELECT FIELD FROM " ++ Table), ["FIELD"] = odbc_test_lib:to_upper(Fields). %%------------------------------------------------------------------------ -dec_double(doc) -> - [""]; dec_double(suit) -> []; dec_double(Config) when is_list(Config) -> @@ -1266,8 +1256,6 @@ dec_double(Config) when is_list(Config) -> ["FIELD"] = odbc_test_lib:to_upper(Fields2). %%------------------------------------------------------------------------ -dec_bignum(doc) -> - [""]; dec_bignum(suit) -> []; dec_bignum(Config) when is_list(Config) -> @@ -1298,8 +1286,6 @@ dec_bignum(Config) when is_list(Config) -> odbc:sql_query(Ref,"SELECT FIELD FROM " ++ Table), ["FIELD"] = odbc_test_lib:to_upper(Fields1). %%------------------------------------------------------------------------ -num_long(doc) -> - [""]; num_long(suit) -> []; num_long(Config) when is_list(Config) -> @@ -1317,8 +1303,6 @@ num_long(Config) when is_list(Config) -> odbc:sql_query(Ref,"SELECT FIELD FROM " ++ Table), ["FIELD"] = odbc_test_lib:to_upper(Fields). %%------------------------------------------------------------------------ -num_double(doc) -> - [""]; num_double(suit) -> []; num_double(Config) when is_list(Config) -> @@ -1363,8 +1347,6 @@ num_double(Config) when is_list(Config) -> odbc:sql_query(Ref,"SELECT FIELD FROM " ++ Table), ["FIELD"] = odbc_test_lib:to_upper(Fields2). %%------------------------------------------------------------------------ -num_bignum(doc) -> - [""]; num_bignum(suit) -> []; num_bignum(Config) when is_list(Config) -> @@ -1396,8 +1378,8 @@ num_bignum(Config) when is_list(Config) -> ["FIELD"] = odbc_test_lib:to_upper(Fields1). %%------------------------------------------------------------------------ -utf8(doc) -> - ["Test unicode support"]; +utf8() -> + [{doc,"Test unicode support"}]. utf8(suit) -> []; utf8(Config) when is_list(Config) -> @@ -1441,8 +1423,8 @@ utf8(Config) when is_list(Config) -> Latin1Data = Result. %%------------------------------------------------------------------------ -nchar(doc) -> - ["Test unicode nchar support in sqlserver"]; +nchar() -> + [{doc,"Test unicode nchar support in sqlserver"}]. nchar(suit) -> []; nchar(Config) when is_list(Config) -> @@ -1457,8 +1439,8 @@ nchar(Config) when is_list(Config) -> %%------------------------------------------------------------------------ -nvarchar(doc) -> - ["Test 'unicode' nvarchar support"]; +nvarchar() -> + [{doc,"Test 'unicode' nvarchar support"}]. nvarchar(suit) -> []; nvarchar(Config) when is_list(Config) -> @@ -1472,8 +1454,6 @@ nvarchar(Config) when is_list(Config) -> w_char_support(Ref, Table, sql_wlongvarchar, 50). %%------------------------------------------------------------------------ -timestamp(doc) -> - [""]; timestamp(suit) -> []; timestamp(Config) when is_list(Config) -> diff --git a/lib/odbc/test/odbc_query_SUITE.erl b/lib/odbc/test/odbc_query_SUITE.erl index a49cd74a43..c283872965 100644 --- a/lib/odbc/test/odbc_query_SUITE.erl +++ b/lib/odbc/test/odbc_query_SUITE.erl @@ -170,8 +170,8 @@ end_per_testcase(_Case, Config) -> %%------------------------------------------------------------------------- %% Test cases starts here. %%------------------------------------------------------------------------- -stored_proc(doc)-> - ["Test stored proc with OUT param"]; +stored_proc()-> + [{doc, "Test stored proc with OUT param"}]. stored_proc(Config) when is_list(Config) -> case ?RDBMS of X when X == oracle; X == postgres-> @@ -189,8 +189,8 @@ stored_proc(Config) when is_list(Config) -> {skip, "stored proc not yet supported"} end. -sql_query(doc)-> - ["Test the common cases"]; +sql_query()-> + [{doc, "Test the common cases"}]. sql_query(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -231,10 +231,10 @@ sql_query(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -select_count(doc) -> - ["Tests select_count/[2,3]'s timeout, " - " select_count's functionality will be better tested by other tests " - " such as first."]; +select_count() -> + [{doc, "Tests select_count/[2,3]'s timeout, " + " select_count's functionality will be better tested by other tests " + " such as first."}]. select_count(sute) -> []; select_count(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), @@ -253,8 +253,8 @@ select_count(Config) when is_list(Config) -> (catch odbc:select_count(Ref, "SELECT * FROM ", -1)), ok. %%------------------------------------------------------------------------- -first(doc) -> - ["Tests first/[1,2]"]; +first() -> + [doc, {"Tests first/[1,2]"}]. first(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -279,8 +279,8 @@ first(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -last(doc) -> - ["Tests last/[1,2]"]; +last() -> + [{doc, "Tests last/[1,2]"}]. last(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -305,8 +305,8 @@ last(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -next(doc) -> - ["Tests next/[1,2]"]; +next() -> + [{doc, "Tests next/[1,2]"}]. next(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -330,8 +330,8 @@ next(Config) when is_list(Config) -> {'EXIT', {function_clause, _}} = (catch odbc:next(Ref, -1)), ok. %%------------------------------------------------------------------------- -prev(doc) -> - ["Tests prev/[1,2]"]; +prev() -> + [{doc, "Tests prev/[1,2]"}]. prev(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -358,8 +358,8 @@ prev(Config) when is_list(Config) -> {'EXIT', {function_clause, _}} = (catch odbc:prev(Ref, -1)), ok. %%------------------------------------------------------------------------- -select_next(doc) -> - ["Tests select/[4,5] with CursorRelation = next "]; +select_next() -> + [{doc, "Tests select/[4,5] with CursorRelation = next "}]. select_next(suit) -> []; select_next(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), @@ -399,8 +399,8 @@ select_next(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -select_relative(doc) -> - ["Tests select/[4,5] with CursorRelation = relative "]; +select_relative() -> + [{doc, "Tests select/[4,5] with CursorRelation = relative "}]. select_relative(suit) -> []; select_relative(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), @@ -440,8 +440,8 @@ select_relative(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -select_absolute(doc) -> - ["Tests select/[4,5] with CursorRelation = absolute "]; +select_absolute() -> + [{doc, "Tests select/[4,5] with CursorRelation = absolute "}]. select_absolute(suit) -> []; select_absolute(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), @@ -474,8 +474,8 @@ select_absolute(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -create_table_twice(doc) -> - ["Test what happens if you try to create the same table twice."]; +create_table_twice() -> + [{doc, "Test what happens if you try to create the same table twice."}]. create_table_twice(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -492,8 +492,8 @@ create_table_twice(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -delete_table_twice(doc) -> - ["Test what happens if you try to delete the same table twice."]; +delete_table_twice() -> + [{doc, "Test what happens if you try to delete the same table twice."}]. delete_table_twice(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -508,8 +508,8 @@ delete_table_twice(Config) when is_list(Config) -> ok. %------------------------------------------------------------------------- -duplicate_key(doc) -> - ["Test what happens if you try to use the same key twice"]; +duplicate_key() -> + [{doc, "Test what happens if you try to use the same key twice"}]. duplicate_key(suit) -> []; duplicate_key(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), @@ -529,9 +529,9 @@ duplicate_key(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -not_connection_owner(doc) -> - ["Test what happens if a process that did not start the connection" - " tries to acess it."]; +not_connection_owner() -> + [{doc, "Test what happens if a process that did not start the connection" + " tries to acess it."}]. not_connection_owner(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -553,9 +553,9 @@ not_owner(Pid, Ref, Table) -> Pid ! continue. %%------------------------------------------------------------------------- -no_result_set(doc) -> - ["Tests what happens if you try to use a function that needs an " - "associated result set when there is none."]; +no_result_set() -> + [{doc, "Tests what happens if you try to use a function that needs an " + "associated result set when there is none."}]. no_result_set(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), @@ -570,8 +570,8 @@ no_result_set(Config) when is_list(Config) -> odbc:select(Ref, {relative, 2}, 1), ok. %%------------------------------------------------------------------------- -query_error(doc) -> - ["Test what happens if there is an error in the query."]; +query_error() -> + [{doc, "Test what happens if there is an error in the query."}]. query_error(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -591,8 +591,8 @@ query_error(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -multiple_select_result_sets(doc) -> - ["Test what happens if you have a batch of select queries."]; +multiple_select_result_sets() -> + [{doc, "Test what happens if you have a batch of select queries."}]. multiple_select_result_sets(Config) when is_list(Config) -> case ?RDBMS of sqlserver -> @@ -624,9 +624,9 @@ multiple_select_result_sets(Config) when is_list(Config) -> end. %%------------------------------------------------------------------------- -multiple_mix_result_sets(doc) -> - ["Test what happens if you have a batch of select and other type of" - " queries."]; +multiple_mix_result_sets() -> + [{doc, "Test what happens if you have a batch of select and other type of" + " queries."}]. multiple_mix_result_sets(Config) when is_list(Config) -> case ?RDBMS of sqlserver -> @@ -656,8 +656,8 @@ multiple_mix_result_sets(Config) when is_list(Config) -> {skip, "multiple result_set not supported"} end. %%------------------------------------------------------------------------- -multiple_result_sets_error(doc) -> - ["Test what happens if one of the batched queries fails."]; +multiple_result_sets_error() -> + [{doc, "Test what happens if one of the batched queries fails."}]. multiple_result_sets_error(Config) when is_list(Config) -> case ?RDBMS of sqlserver -> @@ -689,8 +689,8 @@ multiple_result_sets_error(Config) when is_list(Config) -> end. %%------------------------------------------------------------------------- -param_insert_tiny_int(doc)-> - ["Test insertion of tiny ints by parameterized queries."]; +param_insert_tiny_int()-> + [{doc,"Test insertion of tiny ints by parameterized queries."}]. param_insert_tiny_int(Config) when is_list(Config) -> case ?RDBMS of sqlserver -> @@ -724,8 +724,8 @@ param_insert_tiny_int(Config) when is_list(Config) -> {skip, "Type tiniyint not supported"} end. %%------------------------------------------------------------------------- -param_insert_small_int(doc)-> - ["Test insertion of small ints by parameterized queries."]; +param_insert_small_int()-> + [{doc,"Test insertion of small ints by parameterized queries."}]. param_insert_small_int(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -754,8 +754,8 @@ param_insert_small_int(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -param_insert_int(doc)-> - ["Test insertion of ints by parameterized queries."]; +param_insert_int()-> + [{doc,"Test insertion of ints by parameterized queries."}]. param_insert_int(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -784,8 +784,8 @@ param_insert_int(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -param_insert_integer(doc)-> - ["Test insertion of integers by parameterized queries."]; +param_insert_integer()-> + [{doc,"Test insertion of integers by parameterized queries."}]. param_insert_integer(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -814,8 +814,8 @@ param_insert_integer(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -param_insert_decimal(doc)-> - ["Test insertion of decimal numbers by parameterized queries."]; +param_insert_decimal()-> + [{doc,"Test insertion of decimal numbers by parameterized queries."}]. param_insert_decimal(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -863,8 +863,8 @@ param_insert_decimal(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -param_insert_numeric(doc)-> - ["Test insertion of numeric numbers by parameterized queries."]; +param_insert_numeric()-> + [{doc,"Test insertion of numeric numbers by parameterized queries."}]. param_insert_numeric(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -912,8 +912,8 @@ param_insert_numeric(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -param_insert_char(doc)-> - ["Test insertion of fixed length string by parameterized queries."]; +param_insert_char()-> + [{doc,"Test insertion of fixed length string by parameterized queries."}]. param_insert_char(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -946,8 +946,8 @@ param_insert_char(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -param_insert_character(doc)-> - ["Test insertion of fixed length string by parameterized queries."]; +param_insert_character()-> + [{doc,"Test insertion of fixed length string by parameterized queries."}]. param_insert_character(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -981,8 +981,8 @@ param_insert_character(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------ -param_insert_char_varying(doc)-> - ["Test insertion of variable length strings by parameterized queries."]; +param_insert_char_varying()-> + [{doc,"Test insertion of variable length strings by parameterized queries."}]. param_insert_char_varying(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -1016,8 +1016,8 @@ param_insert_char_varying(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -param_insert_character_varying(doc)-> - ["Test insertion of variable length strings by parameterized queries."]; +param_insert_character_varying()-> + [{doc,"Test insertion of variable length strings by parameterized queries."}]. param_insert_character_varying(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -1051,8 +1051,8 @@ param_insert_character_varying(Config) when is_list(Config) -> [{{sql_varchar, 10}, ["1", 2]}])), ok. %%------------------------------------------------------------------------- -param_insert_float(doc)-> - ["Test insertion of floats by parameterized queries."]; +param_insert_float()-> + [{doc,"Test insertion of floats by parameterized queries."}]. param_insert_float(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -1088,8 +1088,8 @@ param_insert_float(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -param_insert_real(doc)-> - ["Test insertion of real numbers by parameterized queries."]; +param_insert_real()-> + [{doc,"Test insertion of real numbers by parameterized queries."}]. param_insert_real(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -1127,8 +1127,8 @@ param_insert_real(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -param_insert_double(doc)-> - ["Test insertion of doubles by parameterized queries."]; +param_insert_double()-> + [{doc,"Test insertion of doubles by parameterized queries."}]. param_insert_double(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -1164,8 +1164,8 @@ param_insert_double(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -param_insert_mix(doc)-> - ["Test insertion of a mixture of datatypes by parameterized queries."]; +param_insert_mix()-> + [{doc,"Test insertion of a mixture of datatypes by parameterized queries."}]. param_insert_mix(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -1189,8 +1189,8 @@ param_insert_mix(Config) when is_list(Config) -> odbc:sql_query(Ref, "SELECT * FROM " ++ Table), ok. %%------------------------------------------------------------------------- -param_update(doc)-> - ["Test parameterized update query."]; +param_update()-> + [{doc,"Test parameterized update query."}]. param_update(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -1222,9 +1222,9 @@ param_update(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -delete_nonexisting_row(doc) -> % OTP-5759 - ["Make a delete...where with false conditions (0 rows deleted). ", - "This used to give an error message (see ticket OTP-5759)."]; +delete_nonexisting_row() -> % OTP-5759 + [{doc, "Make a delete...where with false conditions (0 rows deleted). ", + "This used to give an error message (see ticket OTP-5759)."}]. delete_nonexisting_row(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -1251,8 +1251,8 @@ delete_nonexisting_row(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -param_delete(doc) -> - ["Test parameterized delete query."]; +param_delete() -> + [{doc,"Test parameterized delete query."}]. param_delete(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -1284,8 +1284,8 @@ param_delete(Config) when is_list(Config) -> %%------------------------------------------------------------------------- -param_select(doc) -> - ["Test parameterized select query."]; +param_select() -> + [{doc,"Test parameterized select query."}]. param_select(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -1312,8 +1312,8 @@ param_select(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -param_select_empty_params(doc) -> - ["Test parameterized select query with no parameters."]; +param_select_empty_params() -> + [{doc,"Test parameterized select query with no parameters."}]. param_select_empty_params(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -1340,8 +1340,8 @@ param_select_empty_params(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -param_delete_empty_params(doc) -> - ["Test parameterized delete query with no parameters."]; +param_delete_empty_params() -> + [{doc,"Test parameterized delete query with no parameters."}]. param_delete_empty_params(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -1372,8 +1372,8 @@ param_delete_empty_params(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -describe_integer(doc) -> - ["Test describe_table/[2,3] for integer columns."]; +describe_integer() -> + [{doc,"Test describe_table/[2,3] for integer columns."}]. describe_integer(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -1389,8 +1389,8 @@ describe_integer(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -describe_string(doc) -> - ["Test describe_table/[2,3] for string columns."]; +describe_string() -> + [{doc,"Test describe_table/[2,3] for string columns."}]. describe_string(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -1408,8 +1408,8 @@ describe_string(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -describe_floating(doc) -> - ["Test describe_table/[2,3] for floting columns."]; +describe_floating() -> + [{doc,"Test describe_table/[2,3] for floting columns."}]. describe_floating(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -1426,8 +1426,8 @@ describe_floating(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -describe_dec_num(doc) -> - ["Test describe_table/[2,3] for decimal and numerical columns"]; +describe_dec_num() -> + [{doc,"Test describe_table/[2,3] for decimal and numerical columns"}]. describe_dec_num(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), @@ -1445,8 +1445,8 @@ describe_dec_num(Config) when is_list(Config) -> %%------------------------------------------------------------------------- -describe_timestamp(doc) -> - ["Test describe_table/[2,3] for tinmestap columns"]; +describe_timestamp() -> + [{doc,"Test describe_table/[2,3] for tinmestap columns"}]. describe_timestamp(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), @@ -1462,8 +1462,8 @@ describe_timestamp(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -describe_no_such_table(doc) -> - ["Test what happens if you try to describe a table that does not exist."]; +describe_no_such_table() -> + [{doc,"Test what happens if you try to describe a table that does not exist."}]. describe_no_such_table(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), diff --git a/lib/odbc/test/odbc_start_SUITE.erl b/lib/odbc/test/odbc_start_SUITE.erl index 3e74a343a6..310b92ca29 100644 --- a/lib/odbc/test/odbc_start_SUITE.erl +++ b/lib/odbc/test/odbc_start_SUITE.erl @@ -127,8 +127,8 @@ app(Config) when is_list(Config) -> appup(Config) when is_list(Config) -> ok = ?t:appup_test(odbc). -start(doc) -> - ["Test start/stop of odbc"]; +start() -> + [{doc,"Test start/stop of odbc"}]. start(Config) when is_list(Config) -> PlatformOptions = odbc_test_lib:platform_options(), {error,odbc_not_started} = odbc:connect(?RDBMS:connection_string(), @@ -160,8 +160,8 @@ start_odbc(Type) -> end. -long_connection_line(doc)-> - ["Test a connection line longer than 127 characters"]; +long_connection_line()-> + [{doc,"Test a connection line longer than 127 characters"}]. long_connection_line(_Config) -> odbc:start(), String133 = "unknown_odbc_parameter=01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789", -- cgit v1.2.3