Skip to content

Commit

Permalink
LDEV-5187 test case using request scope
Browse files Browse the repository at this point in the history
  • Loading branch information
zspitzer committed Dec 10, 2024
1 parent b57b952 commit 7034338
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion test/tags/Query.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,22 @@ component extends="org.lucee.cfml.test.LuceeTestCase" {
testAsyn(new query.QueryListener2(tbl),tbl,1);
}

// Query Listener UDFs don't have the current application scope https://luceeserver.atlassian.net/browse/LDEV-5187
public void function testAsynUDF() {
var udf=function (caller,args,result,meta) {
arguments.args.sql="insert into QueryTestAsync(id,i,dec) values('6',1,1.0)"; // change SQL
request.query_testAsynUDF=true;
return arguments;
};
var tbl="QueryTestAsync";
request.query_testAsynUDF=false;
testAsyn(udf,tbl,0);
sleep(500);
expect(request.query_testAsynUDF).toBeTrue();
structDelete(request, "query_testAsynUDF");
}

// Query Listener UDFs don't have the current application scope https://luceeserver.atlassian.net/browse/LDEV-5187
public void function testAsynUDFApplicationScope() skip="true" {
var udf=function (caller,args,result,meta) {
arguments.args.sql="insert into QueryTestAsync(id,i,dec) values('6',1,1.0)"; // change SQL
application.query_testAsynUDF=true;
Expand Down

0 comments on commit 7034338

Please sign in to comment.