#
# 26-July-2021
#
#-------------------------------------------------------------------------
#
source [file join [file dirname [info script]] test_common.tcl]
set testprefix proxy_hang2
# This test is designed to run with the proxy.tcl/azurite combination
# only. Print an error message and exit if it cannot be found.
if {[catch bcv_proxy_test msg]} { puts $msg ; exit }
# Configure the proxy to pass everything straight through.
#
bcv_proxy_config {
DELETE FROM new_client_message;
}
# Initialize a new system
start_new_daemon 0 -httptimeout 3
set cmd [bcvfs_create testdir.0 "bcvfs"]
bcv_create_container cont1
bcv_upload_new_db cont1 t1.db {
CREATE TABLE x1(x, y);
INSERT INTO x1 VALUES(1, 2);
}
bcvfs_attach $cmd cont1
sqlite3 db /cont1/t1.db -vfs bcvfs
bcv_proxy_config {
INSERT INTO new_client_message(pattern, action) VALUES
('GET%', 'delay 20000');
}
do_catchsql_test 1.0 {
SELECT * FROM t1
} {1 {SQL logic error}}
do_catch_test 1.0 {
$cmd poll cont1
} {1 {Timeout was reached}}
db close
$cmd destroy
wait_daemon 0
finish_test