[patch_done] Some test patches

Code patches written by our users to solve certain "problems" that were not solved, yet.

Moderators: gto, cipto_kh, EgonHugeist, mdaems

Post Reply
seawolf
Zeos Dev Team *
Zeos Dev Team *
Posts: 385
Joined: 04.06.2008, 19:50
Contact:

[patch_done] Some test patches

Post by seawolf »

In order to execute tests with firebird 2.1, please change

..\test\bugreport\ZTestCompInterbase.pas

function ZTestCompInterbaseBugReport.GetSupportedProtocols: string;
begin
Result := 'interbase-5,interbase-6,firebird-1.0,firebird-1.5,firebird-2.0,firebird-2.1,firebirdd-1.5,firebirdd-2.0,firebirdd-2.1';
end;

..\test\bugreport\ZTestDbcInterbase.pas

function TZTestDbcInterbaseBugReport.GetSupportedProtocols: string;
begin
Result := 'interbase-5,interbase-6,firebird-1.0,firebird-1.5,firebird-2.0,firebird-2.1,firebirdd-1.5,firebirdd-2.0,firebirdd-2.1';
end;

..\test\component\ZStoredprocedure.pas

function TZTestInterbaseStoredProcedure.GetSupportedProtocols: string;
begin
Result := 'interbase,interbase-6.5,interbase-7.2,firebird-1.0,firebird-1.5,firebird-2.0,firebird-2.1,firebirdd-1.5,firebirdd-2.0,firebirdd-2.1';
end;

..\test\dbc\ZTestdbcInterbase.pas

function TZTestDbcInterbaseCase.GetSupportedProtocols: string;
begin
Result := 'interbase,interbase-6.5,interbase-7.2,firebird-1.0,firebird-1.5,firebird-2.0,firebird-2.1,firebirdd-1.5,firebirdd-2.0,firebirdd-2.1';
end;

..\test\dbc\ZTestdbcInterbaseMetadata.pas

function TZInterbaseTestDbcMetadata.GetSupportedProtocols: string;
begin
Result := 'interbase-5,interbase-6,firebird-1.0,firebird-1.5,firebird-2.0,firebird-2.1,firebirdd-1.5,firebirdd-2.0,firebirdd-2.1';
end;

..\test\performance\ZTestPlainPerformance.pas

function TZPlainInterbase6SQLPerformanceTestCase.GetSupportedProtocols: string;
begin
Result := 'interbase-5,interbase-6,firebird-1.0,firebird-1.5,firebird-2.0,firebird-2.1,firebirdd-1.5,firebirdd-2.0,firebirdd-2.1';
end;

..\test\performance\ZTestIBXPerformance.pas

function TZIBXPerformanceTestCase.IsProtocolValid(Value: string): boolean;
begin
if (Value = 'interbase-5') or (Value = 'interbase-6') or
(Value = 'firebird-1.0') or (Value = 'firebird-1.5') or
(Value = 'firebird-2.0') or (Value = 'firebird-2.1') or
(Value = 'firebirdd-1.5') or (Value = 'firebirdd-2.0') or
(Value = 'firebirdd-2.1')
then
Result := True
else
Result := False;
end;

..\test\performance\ZTestDBXPerformance.pas

function TZDBXPerformanceTestCase.GetSupportedProtocols: string;
begin
Result := 'mysql,mysql-3.20,mysql-3.23,mysql-4.0'
+ ',sybase,interbase,interbase-5,interbase-6'
+ ',firebird-1.0,firebird-1.5,firebird-2.0,firebird-2.1,firebirdd-1.5,firebirdd-2.0,firebirdd-2.1'
+ ',postgresql,postgresql-7,postgresql-8';
{$IFNDEF LINUX}
Result := Result + ',mssql';
{$ENDIF}
end;

..\packages\ZTestPerformance.dpr

program ZTestPerformance;

{$IFNDEF TESTGUI}
{$APPTYPE CONSOLE}
{$ENDIF}


{$I ..\..\test\performance\ZPerformance.inc}

uses
TestFramework,
{$IFDEF TESTGUI}
GUITestRunner,
{$ELSE}
TextTestRunner,
{$ENDIF}
ZTestConfig,
ZSqlTestCase,
ZPerformanceTestCase,
ZTestBdePerformance in '..\..\test\performance\ZTestBdePerformance.pas',
ZTestPlainPerformance in '..\..\test\performance\ZTestPlainPerformance.pas',
ZTestDbcPerformance in '..\..\test\performance\ZTestDbcPerformance.pas',
ZTestDatasetPerformance in '..\..\test\performance\ZTestDatasetPerformance.pas',
ZTestOldZeosPerformance in '..\..\test\performance\ZTestOldZeosPerformance.pas',
ZTestDbxPerformance in '..\..\test\performance\ZTestDbxPerformance.pas',
ZTestIBXPerformance in '..\..\test\performance\ZTestIbxPerformance.pas';

begin
TestGroup := PERFORMANCE_TEST_GROUP;
RebuildTestDatabases;
{$IFDEF TESTGUI}
GUITestRunner.RunRegisteredTests;
{$ELSE}
TextTestRunner.RunRegisteredTests;
{$ENDIF}
PerformanceResultProcessor.ProcessResults;
PerformanceResultProcessor.PrintResults;
end.

..\test\performance\ZTestPlainPerformance.pas

uses TestFramework, SysUtils, Classes, ZPerformanceTestCase,
{$IFDEF ENABLE_DBLIB}
{$ENDIF}
{$IFDEF ENABLE_INTERBASE}
ZPlainInterbaseDriver, <---- remove
ZDbcInterbase6Utils,
ZPlainFirebirdDriver,
ZPlainFirebirdInterbaseConstants,
{$ENDIF}
{$IFDEF ENABLE_MYSQL}
ZPlainMySqlDriver,
ZPlainMysqlConstants, <---- add
{$ENDIF}


{$ENDIF}

implementation

uses ZSqlTestCase, ZPlainMysqlConstants <--- remove ;

{$IFDEF ENABLE_MYSQL}


procedure TZPlainInterbase6SQLPerformanceTestCase.SetUp;
var
FFirebird10PlainDriver: IZInterbasePlainDriver;
FFirebird15PlainDriver: IZInterbasePlainDriver;
FFirebird20PlainDriver: IZInterbasePlainDriver;
FFirebird21PlainDriver: IZInterbasePlainDriver;
FFirebirdd15PlainDriver: IZInterbasePlainDriver;
FFirebirdd20PlainDriver: IZInterbasePlainDriver;
FFirebirdd21PlainDriver: IZInterbasePlainDriver;

// FInterbse5PlainDriver: IZInterbasePlainDriver; <--- remove
// FInterbse6PlainDriver: IZInterbasePlainDriver; <--- remove
begin
if Protocol = 'interbase-5' then
FDialect := 1
else FDialect := 3;
FFirebird10PlainDriver := TZFirebird10PlainDriver.Create;
FFirebird15PlainDriver := TZFirebird15PlainDriver.Create;
FFirebird20PlainDriver := TZFirebird20PlainDriver.Create;
FFirebird21PlainDriver := TZFirebird21PlainDriver.Create;
FFirebirdd15PlainDriver := TZFirebird15PlainDriver.Create;
FFirebirdd20PlainDriver := TZFirebirdd20PlainDriver.Create;
FFirebirdd21PlainDriver := TZFirebirdd21PlainDriver.Create;
// FInterbse5PlainDriver := TZInterbase5PlainDriver.Create; <--- remove
// FInterbse6PlainDriver := TZInterbase6PlainDriver.Create; <--- remove

if Protocol = FFirebird10PlainDriver.GetProtocol then
PlainDriver := FFirebird10PlainDriver
else if Protocol = FFirebird15PlainDriver.GetProtocol then
PlainDriver := FFirebird15PlainDriver
else if Protocol = FFirebird20PlainDriver.GetProtocol then
PlainDriver := FFirebird20PlainDriver
else if Protocol = FFirebird21PlainDriver.GetProtocol then
PlainDriver := FFirebird21PlainDriver
else if Protocol = FFirebirdd15PlainDriver.GetProtocol then
PlainDriver := FFirebirdd15PlainDriver
else if Protocol = FFirebirdd21PlainDriver.GetProtocol then
PlainDriver := FFirebird21PlainDriver

// else if Protocol = FInterbse5PlainDriver.GetProtocol then <--- remove
// PlainDriver := FInterbse5PlainDriver <--- remove
// else if Protocol = FInterbse6PlainDriver.GetProtocol then <--- remove
// PlainDriver := FInterbse6PlainDriver <--- remove
else PlainDriver := FFirebird10PlainDriver;

PlainDriver.Initialize;
end;
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

SVN rev. 653 (Testing branch). This will not make it into the 6.6.5 release, but the next one.

Unfortunately (?) the results are terrible, giving us once more loads of errors to look at.

I see you did some work for the performance test project as well. (even with the GUI interface). Are you effectively using that one? I must admit I never had succes with it. Can you show me the relevant settings you're using? Where do you see the results?

Mark
Image
seawolf
Zeos Dev Team *
Zeos Dev Team *
Posts: 385
Joined: 04.06.2008, 19:50
Contact:

Post by seawolf »

Really sorry I don't understand.

I've never ran tests with Firebird under D2009 (but i will try next days), but only with D7 (and I must admit there are some problems).

After the post related to locate problem I tried Ztestperformance (only the Firebird side) but I had no problems. Anyway I planned to write a more accurate Locatetest.

Anyway tomorrow I can send you my test db and test settings, if it is what you asked me.
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Unfortunately (?) the results are terrible, giving us once more loads of errors to look at.
--> don't worry : it all compiles well. And the results are probably correct. It only shows more errors as before enabling these protocols. Which is never fun for me to see, but could be expected when the number of running tests doubles. That's not your fault! Your part of the job's done (and it's done well)
After the post related to locate problem I tried Ztestperformance (only the Firebird side) but I had no problems.
Indeed, can you just explain me how to use the performance test program? I don't even have a clue what it exactly does, what the expected result is and how to configure?

Mark
Image
Post Reply