Skip to content

Commit

Permalink
LDEV-4096 update to testbox 5.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zspitzer committed Dec 7, 2024
1 parent 553aecd commit a18cc08
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 19 deletions.
19 changes: 14 additions & 5 deletions ant/build-core.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@
<property name="bundleName" value="Lucee Core"/>
<property name="bundleSymbolicName" value="lucee.core"/>

<property name="testboxVersion" value="3.2.0"/>
<property name="testboxVersion" value="5.3.0"/>
<property name="testboxURL"
value="https://downloads.ortussolutions.com/ortussolutions/testbox/${testboxVersion}/testbox-${testboxVersion}.zip"/>
<property name="extURL" value="https://extension.lucee.org/rest/extension/provider/full/"/>

<property name="globberURL"
value="https://github.com/Ortus-Solutions/globber/archive/refs/tags/v3.1.5.zip"/>

<property name="extMongo" value="E6634E1A-4CC5-4839-A83C67549ECA8D5B"/>
<property name="extH2" value="465E1E35-2425-4F4E-8B3FAB638BD7280A;version=2.1.214.0001L"/>
<property name="extOracle" value="D4EDFDBD-A9A3-E9AF-597322D767E0C949;version=19.12.0.0-ojdbc8"/>
Expand Down Expand Up @@ -248,7 +250,7 @@
</sequential>
</macrodef>

<target name="check" depends="check-mysql,check-mssql,check-postgre,check-jdts,check-s3,check-ehcache,check-pdf,check-admin,check-doc,check-image,check-esapi,check-compress,check-testbox,check-lucee-loader-jar,download-lucee-loader-jar">
<target name="check" depends="check-mysql,check-mssql,check-postgre,check-jdts,check-s3,check-ehcache,check-pdf,check-admin,check-doc,check-image,check-esapi,check-compress,check-testbox,check-testbox-globber,check-lucee-loader-jar,download-lucee-loader-jar">
<mkdir dir="${temp}/loader/extensions/"/>
</target>

Expand Down Expand Up @@ -565,7 +567,7 @@

<jvmarg value="-Dsrc=${tmpContext}"/>
<jvmarg value="-Dtemp=${temp}/archive"/>
<jvmarg value="-Dtestbox=${temp}/testbox/testbox"/>
<jvmarg value="-Dtestbox=${temp}/testbox/"/>
<jvmarg value="-DcompileTestBox=${compileTestBox}"/>
<jvmarg value="-Dlucee.base.dir=${temp}/archive/base"/>
<jvmarg value="-Dlucee.web.dir=${temp}/archive/webroot"/>
Expand All @@ -588,8 +590,15 @@
<copy
file="${cache}/testbox-${testboxVersion}.zip"
todir="${temp}"/>
<!-- testbox -->
<!-- testbox -->
<unzip src="${temp}/testbox-${testboxVersion}.zip" dest="${temp}/testbox"/>

<!-- hack avoid needing all of commandbox for just one module -->
<copy
file="${cache}/globber.zip"
todir="${temp}"/>
<unzip src="${temp}/globber.zip" dest="${temp}/testbox/system/modules"/>
<move file="${temp}/testbox/system/modules/globber-3.1.5" tofile="${temp}/testbox/system/modules/globber"/>
<delete dir="${temp}/testbox-${testboxVersion}.zip"/>
</target>
<!--
Expand Down
5 changes: 4 additions & 1 deletion ant/build-extensions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@

<target name="check-cache">
<available file="${cache}/testbox-${testboxVersion}.zip" property="testbox.present"/>

<available file="${cache}/globber.zip" property="globber.present"/>
<available file="${cache}/${extMySQL}-${extMySQLVersion}.lex" property="mysql.present"/>
<available file="${cache}/${extMSSQL}-${extMSSQLVersion}.lex" property="mssql.present"/>
<available file="${cache}/${extPostgreSQL}-${extPostgreSQLVersion}.lex" property="postgre.present"/>
Expand Down Expand Up @@ -196,6 +196,9 @@
</target>
<target name="check-testbox" depends="check-cache" unless="testbox.present">
<get src="${testboxURL}" dest="${cache}/testbox-${testboxVersion}.zip"/>
</target>
<target name="check-testbox-globber" depends="check-cache" unless="globber.present">
<get src="${globberURL}" dest="${cache}/globber.zip"/>
</target>
<target name="addExtensions" if="buildLoaderJar">
<echots message="add extensions"/>
Expand Down
5 changes: 5 additions & 0 deletions test/datasource/MongoDB.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ component extends="org.lucee.cfml.test.LuceeTestCase" labels="mongodb" {
public void function testMongoDBID() skip="isNotSupported" {
if(isNotSupported()) return;
var id = MongoDBID();
systemOutput( id, true );
systemOutput( id.getClass(), true );
systemOutput( id.toString(), true );
systemOutput( serializeJson(id), true );
expect( id ).toBeDate();
$assert.key(id,"date");
$assert.key(id,"timestamp");
$assert.key(id,"id");
Expand Down
28 changes: 16 additions & 12 deletions test/tags/Query.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -228,12 +228,13 @@ component extends="org.lucee.cfml.test.LuceeTestCase" {
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;
systemOutput(arguments, true);
return arguments;
};
var tbl="QueryTestAsync";
application.query_testAsynUDF=false;
testAsyn(udf,tbl,0);
assertTrue(application.query_testAsynUDF);
expect(application.query_testAsynUDF).toBeTrue();
}

public void function testAsynStructUDF() {
Expand Down Expand Up @@ -269,11 +270,14 @@ component extends="org.lucee.cfml.test.LuceeTestCase" {
}

sleep(500);
systemOutput("post sleep", true);
query name="local.qry" {
echo("select * from "&tbl);
}
assertTrue(qry.recordcount==1);
assertEquals(res,qry.id);
expect( qry.recordcount ).toBe ( 1 );
expect( res ).toBe(qry.id);
} catch( e ){
systemOutput( e, true );
}
finally {
dropTable(tbl);
Expand All @@ -293,9 +297,8 @@ component extends="org.lucee.cfml.test.LuceeTestCase" {

echo("select id from T"&suffix);
}
assertEquals(1,qry.recordcount);
assertEquals("1234",qry.id);

expect( qry.recordcount ).toBe( 1 );
expect( qry.id ).toBe( "1234" );

query name="local.qry" listener={
after=function (caller,args,result,meta) {
Expand All @@ -305,9 +308,9 @@ component extends="org.lucee.cfml.test.LuceeTestCase" {
} {

echo("select id from T"&suffix);
}
assertEquals(3,qry.recordcount);
assertEquals("A",qry.columnlist);
}
expect( qry.recordcount ).toBe( 3 );
expect( qry.columnlist ).toBe( "A" );

}

Expand All @@ -329,9 +332,10 @@ component extends="org.lucee.cfml.test.LuceeTestCase" {

{
echo("insert into T"&suffix&"(id,i,dec) values('2',1,1.0)");
}
assertEquals(3,qry.recordcount);
assertEquals("A",qry.columnlist);
}

expect( qry.recordcount ).toBe( 3 );
expect( qry.columnlist ).toBe( "A" );

}

Expand Down
1 change: 0 additions & 1 deletion test/tickets/LDEV3116.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ component extends="org.lucee.cfml.test.LuceeTestCase" labels="thread" {
thread.testing = 'blah';
}
thread action="join" name="test_without";
systemOutput(cfthread.test_without,1,1);
expect( cfthread.test_without ).notToHaveKey( "error", cfthread.test_without.error.stacktrace?: '???' );
expect( cfthread.test_without.testing ).toBe( "blah" );
} );
Expand Down

0 comments on commit a18cc08

Please sign in to comment.