diff --git a/distributions/teamcity/build.gradle b/distributions/teamcity/build.gradle index f499b8e7ef..53cb4cc5be 100644 --- a/distributions/teamcity/build.gradle +++ b/distributions/teamcity/build.gradle @@ -22,7 +22,7 @@ project.tasks.register("distribution", ModuleDistribution) { dist.extraFileIdentifier = '-test' dist.versionPrefix = 'Test' - dist.extraProperties = [supportedDatabases: "pgsql, mssql"] + dist.extraProperties = [supportedDatabases: "pgsql"] } diff --git a/modules/ETLtest/module.properties b/modules/ETLtest/module.properties index 5377f7ecc1..88ce89626a 100644 --- a/modules/ETLtest/module.properties +++ b/modules/ETLtest/module.properties @@ -1,4 +1,3 @@ Name: ETLtest SchemaVersion: 26.001 -SupportedDatabases: mssql, pgsql ManageVersion: true diff --git a/modules/ETLtest/resources/externalFixtures/README.md b/modules/ETLtest/resources/externalFixtures/README.md new file mode 100644 index 0000000000..ae34f1b854 --- /dev/null +++ b/modules/ETLtest/resources/externalFixtures/README.md @@ -0,0 +1,29 @@ +# External SQL Server fixtures + +SQL Server is no longer supported as LabKey's primary database, but it **is** still supported as an external data source, including running stored procedures through the DataIntegration `StoredProcedureStep`. These scripts are the SQL Server dialect fixtures for that feature, preserved when the primary-DB SQL Server dbscripts were removed. + +They are deliberately **not** under `schemas/dbscripts/`. The module upgrade scanner only reads `schemas/dbscripts//`, so nothing here can ever execute against the primary database. Apply them by hand to an external SQL Server database. + +| Script | Contents | +|---|---| +| `sqlserver/etltest-procs.sql` | `etltest` schema, the `source` table, and the `etlTest` / `etlTestResultSet` procedures covering the nine test modes (return codes, raised errors, in/out parameter persistence, run and modified-since filter strategies, result sets) | +| `sqlserver/etltest-specialchars.sql` | `"etl test!schema"."etl""test proc!"` — identifier quoting/escaping for schema and procedure names containing spaces, `!`, and an embedded double-quote. Driven by `../ETLs/SProcSpecialCharacters.xml` | + +## Porting notes + +These were lifted from the deleted `schemas/dbscripts/sqlserver/` scripts and adjusted for a database that is not a LabKey primary DB: + +- `entityid` is a LabKey alias type defined by `core`; replaced with `UNIQUEIDENTIFIER`. +- The `container` foreign key to `core.containers` was dropped — that table does not exist in an external database. +- `EXEC core.fn_dropifexists` calls were dropped for the same reason. Scripts assume a clean schema. +- The procedures are the final state, not the `CREATE` plus `ALTER` chain the versioned dbscripts carried. + +The trap worth knowing before editing `etltest-specialchars.sql`: LabKey's `SqlScanner` does not understand `[bracket]` quoting and will misread a double-quote inside brackets as the start of a string literal. Use `"..."` with the interior quote doubled as `""`, and keep `SET QUOTED_IDENTIFIER ON`. + +## Not wired up in TeamCity + +There is no automated coverage for this path yet, and `test.properties.template` has no external-datasource keys at all — that absence, not a missing fixture, is the gap. Wiring it up needs, at minimum: + +- external SQL Server datasource properties in `test.properties.template` and the TeamCity build configuration +- a way to apply these scripts to that database during test setup +- a skip gate for "an external SQL Server datasource is configured". Note this is **not** `SqlserverOnlyTest`, which means "the primary database is SQL Server" and is now permanently false. diff --git a/modules/ETLtest/resources/externalFixtures/sqlserver/etltest-procs.sql b/modules/ETLtest/resources/externalFixtures/sqlserver/etltest-procs.sql new file mode 100644 index 0000000000..f3813bb696 --- /dev/null +++ b/modules/ETLtest/resources/externalFixtures/sqlserver/etltest-procs.sql @@ -0,0 +1,203 @@ +/* + * Copyright (c) 2026 LabKey Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +-- SQL Server fixture for the DataIntegration StoredProcedureStep. Apply by hand to an external SQL Server +-- database; see ../README.md. Not a module dbscript: it is deliberately outside schemas/dbscripts/ so the +-- module upgrade scanner never runs it against the primary database. + +-- entityid is a LabKey alias type defined by core, and core.containers does not exist in an external +-- database, so container is a bare UNIQUEIDENTIFIER here with no foreign key. The primary-DB Postgres +-- script keeps both. +CREATE SCHEMA etltest; +GO + +CREATE TABLE etltest.source( + RowId INT IDENTITY(1,1), + container UNIQUEIDENTIFIER, + created DATETIME, + modified DATETIME, + id VARCHAR(9), + name VARCHAR(100), + TransformRun INT, + rowversion rowversion, + + CONSTRAINT PK_etlsource PRIMARY KEY (rowid), + CONSTRAINT AK_etlsource UNIQUE (container,id) +); +GO + +CREATE PROCEDURE etltest.etlTest + @transformRunId int, + @containerId UNIQUEIDENTIFIER = NULL OUTPUT, + @rowsInserted int = 0 OUTPUT, + @rowsDeleted int = 0 OUTPUT, + @rowsModified int = 0 OUTPUT, + @returnMsg varchar(100) = 'default message' OUTPUT, + @debug varchar(1000) = '', + @filterRunId int = null, + @filterStartTimeStamp datetime = null OUTPUT, + @filterEndTimeStamp datetime = null OUTPUT, + @testMode int, + @testInOutParam varchar(10) = null OUTPUT, + @runCount int = 1 OUTPUT, + @previousFilterRunId int = -1 OUTPUT, + @previousFilterStartTimeStamp datetime = null OUTPUT, + @previousFilterEndTimeStamp datetime = null OUTPUT + AS +BEGIN + +/* + Test modes + 1 normal operation + 2 return code > 0 + 3 raise error + 4 input/output parameter persistence + 5 override of persisted input/output parameter + 6 Run filter strategy, require filterRunId. Test persistence. + 7 Modified since filter strategy, no source, require filterStartTimeStamp & filterEndTimeStamp, + populated from output of previous run + 8 Modified since filter strategy with source, require filterStartTimeStamp & filterEndTimeStamp + populated from the filter strategy IncrementalStartTime & IncrementalEndTime + 9 Sleep for 2 minutes before finishing +*/ + +IF @testMode IS NULL +BEGIN + SET @returnMsg = 'No testMode set' + RETURN 1 +END + +IF @runCount IS NULL + SET @runCount = 1; +ELSE + SET @runCount = @runCount + 1; + +IF @testMode = 1 +BEGIN + print 'Test print statement logging' + SET @rowsInserted = 1 + SET @rowsDeleted = 2 + SET @rowsModified = 4 + SET @returnMsg = 'Test returnMsg logging' + RETURN 0 +END + +IF @testMode = 2 RETURN 1 + +IF @testMode = 3 +BEGIN + SET @returnMsg = 'Intentional SQL Exception From Inside Proc' + RAISERROR(@returnMsg, 11, 1) +END + +IF @testMode = 4 AND @testInOutParam != 'after' AND @runCount > 1 +BEGIN + SET @returnMsg = 'Expected value "after" for @testInOutParam on run count = ' + convert(varchar, @runCount) + ', but was ' + @testInOutParam + RETURN 1 +END + +IF @testMode = 5 AND @testInOutParam != 'before' AND @runCount > 1 +BEGIN + SET @returnMsg = 'Expected value "before" for @testInOutParam on run count = ' + convert(varchar, @runCount) + ', but was ' + @testInOutParam + RETURN 1 +END + +IF @testMode = 6 +BEGIN + IF @filterRunId IS NULL +BEGIN + SET @returnMsg = 'Required @filterRunId value not supplied' + RETURN 1 +END + IF @runCount > 1 AND (@previousFilterRunId IS NULL OR @previousFilterRunId >= @filterRunId) +BEGIN + SET @returnMsg = 'Required @filterRunId was not persisted from previous run.' + RETURN 1 +END + SET @previousFilterRunId = @filterRunId +END + +IF @testMode = 7 +BEGIN + IF @runCount > 1 AND (@filterStartTimeStamp IS NULL AND @filterEndTimeStamp IS NULL) +BEGIN + SET @returnMsg = 'Required filterStartTimeStamp or filterEndTimeStamp were not persisted from previous run.'; +RETURN 1; +END; + SET @filterStartTimeStamp = CURRENT_TIMESTAMP; + SET @filterEndTimeStamp = CURRENT_TIMESTAMP; +END; + +IF @testMode = 8 + +BEGIN + IF @runCount > 1 AND ((@previousFilterStartTimeStamp IS NULL AND @previousFilterEndTimeStamp IS NULL) + OR (@filterStartTimeStamp IS NULL AND @filterEndTimeStamp IS NULL)) +BEGIN + SET @returnMsg = 'Required filterStartTimeStamp or filterEndTimeStamp were not persisted from previous run.'; +RETURN 1; +END; + SET @previousFilterStartTimeStamp = coalesce(@filterStartTimeStamp, CURRENT_TIMESTAMP); + SET @previousFilterEndTimeStamp = coalesce(@filterEndTimeStamp, CURRENT_TIMESTAMP); +END; + +IF @testMode = 9 +BEGIN + -- Sleep for 30 seconds + WAITFOR DELAY '00:00:30' + RETURN 1; +END; + +-- set value for persistence tests +IF @testInOutParam IS NOT NULL AND @testInOutParam != '' SET @testInOutParam = 'after' + +RETURN 0 + +END +GO + +-- testMode 9 returns a result set rather than only output parameters, exercising the step's result-set handling. +CREATE PROCEDURE etltest.etlTestResultSet + @transformRunId int, + @containerId varchar(100) = NULL OUTPUT, + @rowsInserted int = 0 OUTPUT, + @rowsDeleted int = 0 OUTPUT, + @rowsModified int = 0 OUTPUT, + @returnMsg varchar(100) = 'default message' OUTPUT, + @debug varchar(1000) = '', + @filterRunId int = null, + @filterStartTimeStamp datetime = null OUTPUT, + @filterEndTimeStamp datetime = null OUTPUT, + @testMode int, + @testInOutParam varchar(10) = null OUTPUT, + @runCount int = 1 OUTPUT, + @previousFilterRunId int = null OUTPUT, + @previousFilterStartTimeStamp datetime = null OUTPUT, + @previousFilterEndTimeStamp datetime = null OUTPUT +AS +BEGIN + +IF @testMode = 9 +BEGIN + SELECT * FROM etltest.source WHERE container = @containerId +END + +IF @testInOutParam IS NOT NULL SET @testInOutParam = 'after' + +RETURN 0 + +END +GO diff --git a/modules/ETLtest/resources/schemas/dbscripts/sqlserver/etltest-26.000-26.001.sql b/modules/ETLtest/resources/externalFixtures/sqlserver/etltest-specialchars.sql similarity index 76% rename from modules/ETLtest/resources/schemas/dbscripts/sqlserver/etltest-26.000-26.001.sql rename to modules/ETLtest/resources/externalFixtures/sqlserver/etltest-specialchars.sql index b59a44fa51..81ec5ed7f3 100644 --- a/modules/ETLtest/resources/schemas/dbscripts/sqlserver/etltest-26.000-26.001.sql +++ b/modules/ETLtest/resources/externalFixtures/sqlserver/etltest-specialchars.sql @@ -14,11 +14,13 @@ * limitations under the License. */ --- Create a schema and stored procedure whose names contain special characters (spaces, exclamation point, and an +-- SQL Server fixture for the DataIntegration StoredProcedureStep. Apply by hand to an external SQL Server +-- database; see ../README.md. Not a module dbscript: it is deliberately outside schemas/dbscripts/ so the +-- module upgrade scanner never runs it against the primary database. + +-- Creates a schema and stored procedure whose names contain special characters (spaces, exclamation point, and an -- embedded double-quote in the procedure name). These exercise the identifier quoting/escaping that SqlDialect --- applies when building the CALL statement for the DataIntegration StoredProcedureStep. The schema is registered --- with the module via the matching schema metadata file; it is created here because the module dbscript filename --- convention only permits word-character schema names. +-- applies when building the CALL statement for the StoredProcedureStep. Driven by ETLs/SProcSpecialCharacters.xml. -- Use double-quote delimited identifiers (with the interior quote doubled as "") rather than [bracket] identifiers. -- LabKey's SqlScanner, which splits scripts into statements, does not understand bracket quoting and would misread a diff --git a/modules/ETLtest/resources/schemas/dbscripts/sqlserver/etltest-0.000-25.000.sql b/modules/ETLtest/resources/schemas/dbscripts/sqlserver/etltest-0.000-25.000.sql deleted file mode 100644 index de5cbd4022..0000000000 --- a/modules/ETLtest/resources/schemas/dbscripts/sqlserver/etltest-0.000-25.000.sql +++ /dev/null @@ -1,987 +0,0 @@ -/* - * Copyright (c) 2017-2026 LabKey Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ --- These tables/procedures were formerly in the vehicle schema controlled by the simpletest module - -CREATE SCHEMA etltest; -GO -CREATE TABLE etltest.source( - RowId INT IDENTITY(1,1), - container entityid, - created DATETIME, - modified DATETIME, - id VARCHAR(9), - name VARCHAR(100), - TransformRun INT, - rowversion rowversion, - - CONSTRAINT PK_etlsource PRIMARY KEY (rowid), - CONSTRAINT AK_etlsource UNIQUE (container,id), - CONSTRAINT FK_etlsource_container FOREIGN KEY (container) REFERENCES core.containers (entityid) -); - - -CREATE TABLE etltest.target( - RowId INT IDENTITY(1,1), - container entityid, - created DATETIME, - modified DATETIME, - id VARCHAR(9), - name VARCHAR(100), - diTransformRunId INT, - - CONSTRAINT PK_etltarget PRIMARY KEY (rowid), - CONSTRAINT AK_etltarget UNIQUE (container,id), - CONSTRAINT FK_etltarget_container FOREIGN KEY (container) REFERENCES core.containers (entityid) -); - -CREATE TABLE etltest.target2 -( - RowId INT NOT NULL, - container entityid NOT NULL, - created DATETIME, - modified DATETIME, - - id VARCHAR(9), - name VARCHAR(100), - diTransformRunId INT NOT NULL, - - CONSTRAINT PK_etltarget2 PRIMARY KEY (rowid, container), - CONSTRAINT AK_etltarget2 UNIQUE (container,id), - CONSTRAINT FK_etltarget2_container FOREIGN KEY (container) REFERENCES core.containers (entityid) -); - -CREATE TABLE etltest.Transfer -( - RowId INT NOT NULL, - TransferStart DATETIME NOT NULL, - transferComplete DATETIME NULL, - schemaName NVARCHAR(100) NOT NULL, - description NVARCHAR(1000) NULL, - log NVARCHAR(MAX) NULL, - status NVARCHAR(10) NULL, - container entityid NULL, - CONSTRAINT PK_transfer PRIMARY KEY (rowid), - CONSTRAINT FK_etltransfer_container FOREIGN KEY(container) REFERENCES core.Containers (EntityId) -); - -CREATE TABLE etltest.[delete] -( - RowId INT IDENTITY(1,1), - container entityid, - created DATETIME, - modified DATETIME, - - id VARCHAR(9), - name VARCHAR(100), - TransformRun INT, - rowversion rowversion, - CONSTRAINT PK_delete PRIMARY KEY (rowid), - CONSTRAINT AK_delete UNIQUE (container,id), - CONSTRAINT FK_delete_container FOREIGN KEY (container) REFERENCES core.containers (entityid) -); - -CREATE TABLE etltest.x180column_source( - RowId int IDENTITY(1,1) NOT NULL, - container entityid NULL, - created datetime NULL, - modified datetime NULL, - field5 INT NULL, - field6 INT NULL, - field7 INT NULL, - field8 INT NULL, - field9 INT NULL, - field10 INT NULL, - field11 INT NULL, - field12 INT NULL, - field13 INT NULL, - field14 INT NULL, - field15 INT NULL, - field16 INT NULL, - field17 INT NULL, - field18 INT NULL, - field19 INT NULL, - field20 INT NULL, - field21 INT NULL, - field22 INT NULL, - field23 INT NULL, - field24 INT NULL, - field25 INT NULL, - field26 INT NULL, - field27 INT NULL, - field28 INT NULL, - field29 INT NULL, - field30 INT NULL, - field31 INT NULL, - field32 INT NULL, - field33 INT NULL, - field34 INT NULL, - field35 INT NULL, - field36 INT NULL, - field37 INT NULL, - field38 INT NULL, - field39 INT NULL, - field40 INT NULL, - field41 INT NULL, - field42 INT NULL, - field43 INT NULL, - field44 INT NULL, - field45 INT NULL, - field46 INT NULL, - field47 INT NULL, - field48 INT NULL, - field49 INT NULL, - field50 INT NULL, - field51 INT NULL, - field52 INT NULL, - field53 INT NULL, - field54 INT NULL, - field55 INT NULL, - field56 INT NULL, - field57 INT NULL, - field58 INT NULL, - field59 INT NULL, - field60 INT NULL, - field61 INT NULL, - field62 INT NULL, - field63 INT NULL, - field64 INT NULL, - field65 INT NULL, - field66 INT NULL, - field67 INT NULL, - field68 INT NULL, - field69 INT NULL, - field70 INT NULL, - field71 INT NULL, - field72 INT NULL, - field73 INT NULL, - field74 INT NULL, - field75 INT NULL, - field76 INT NULL, - field77 INT NULL, - field78 INT NULL, - field79 INT NULL, - field80 INT NULL, - field81 INT NULL, - field82 INT NULL, - field83 INT NULL, - field84 INT NULL, - field85 INT NULL, - field86 INT NULL, - field87 INT NULL, - field88 INT NULL, - field89 INT NULL, - field90 INT NULL, - field91 INT NULL, - field92 INT NULL, - field93 INT NULL, - field94 INT NULL, - field95 INT NULL, - field96 INT NULL, - field97 INT NULL, - field98 INT NULL, - field99 INT NULL, - field100 INT NULL, - field101 INT NULL, - field102 INT NULL, - field103 INT NULL, - field104 INT NULL, - field105 INT NULL, - field106 INT NULL, - field107 INT NULL, - field108 INT NULL, - field109 INT NULL, - field110 INT NULL, - field111 INT NULL, - field112 INT NULL, - field113 INT NULL, - field114 INT NULL, - field115 INT NULL, - field116 INT NULL, - field117 INT NULL, - field118 INT NULL, - field119 INT NULL, - field120 INT NULL, - field121 INT NULL, - field122 INT NULL, - field123 INT NULL, - field124 INT NULL, - field125 INT NULL, - field126 INT NULL, - field127 INT NULL, - field128 INT NULL, - field129 INT NULL, - field130 INT NULL, - field131 INT NULL, - field132 INT NULL, - field133 INT NULL, - field134 INT NULL, - field135 INT NULL, - field136 INT NULL, - field137 INT NULL, - field138 INT NULL, - field139 INT NULL, - field140 INT NULL, - field141 INT NULL, - field142 INT NULL, - field143 INT NULL, - field144 INT NULL, - field145 INT NULL, - field146 INT NULL, - field147 INT NULL, - field148 INT NULL, - field149 INT NULL, - field150 INT NULL, - field151 INT NULL, - field152 INT NULL, - field153 INT NULL, - field154 INT NULL, - field155 INT NULL, - field156 INT NULL, - field157 INT NULL, - field158 INT NULL, - field159 INT NULL, - field160 INT NULL, - field161 INT NULL, - field162 INT NULL, - field163 INT NULL, - field164 INT NULL, - field165 INT NULL, - field166 INT NULL, - field167 INT NULL, - field168 INT NULL, - field169 INT NULL, - field170 INT NULL, - field171 INT NULL, - field172 INT NULL, - field173 INT NULL, - field174 INT NULL, - field175 INT NULL, - field176 INT NULL, - field177 INT NULL, - field178 INT NULL, - field179 INT NULL, - field180 INT NULL, - - CONSTRAINT PK_x180column_source PRIMARY KEY (RowId), - CONSTRAINT FK_x180column_source_container FOREIGN KEY (container) REFERENCES core.containers (entityid) -); - -CREATE TABLE etltest.x180column_target( - RowId int NOT NULL, - container entityid NOT NULL, - created datetime NULL, - modified datetime NULL, - field5 INT NULL, - field6 INT NULL, - field7 INT NULL, - field8 INT NULL, - field9 INT NULL, - field10 INT NULL, - field11 INT NULL, - field12 INT NULL, - field13 INT NULL, - field14 INT NULL, - field15 INT NULL, - field16 INT NULL, - field17 INT NULL, - field18 INT NULL, - field19 INT NULL, - field20 INT NULL, - field21 INT NULL, - field22 INT NULL, - field23 INT NULL, - field24 INT NULL, - field25 INT NULL, - field26 INT NULL, - field27 INT NULL, - field28 INT NULL, - field29 INT NULL, - field30 INT NULL, - field31 INT NULL, - field32 INT NULL, - field33 INT NULL, - field34 INT NULL, - field35 INT NULL, - field36 INT NULL, - field37 INT NULL, - field38 INT NULL, - field39 INT NULL, - field40 INT NULL, - field41 INT NULL, - field42 INT NULL, - field43 INT NULL, - field44 INT NULL, - field45 INT NULL, - field46 INT NULL, - field47 INT NULL, - field48 INT NULL, - field49 INT NULL, - field50 INT NULL, - field51 INT NULL, - field52 INT NULL, - field53 INT NULL, - field54 INT NULL, - field55 INT NULL, - field56 INT NULL, - field57 INT NULL, - field58 INT NULL, - field59 INT NULL, - field60 INT NULL, - field61 INT NULL, - field62 INT NULL, - field63 INT NULL, - field64 INT NULL, - field65 INT NULL, - field66 INT NULL, - field67 INT NULL, - field68 INT NULL, - field69 INT NULL, - field70 INT NULL, - field71 INT NULL, - field72 INT NULL, - field73 INT NULL, - field74 INT NULL, - field75 INT NULL, - field76 INT NULL, - field77 INT NULL, - field78 INT NULL, - field79 INT NULL, - field80 INT NULL, - field81 INT NULL, - field82 INT NULL, - field83 INT NULL, - field84 INT NULL, - field85 INT NULL, - field86 INT NULL, - field87 INT NULL, - field88 INT NULL, - field89 INT NULL, - field90 INT NULL, - field91 INT NULL, - field92 INT NULL, - field93 INT NULL, - field94 INT NULL, - field95 INT NULL, - field96 INT NULL, - field97 INT NULL, - field98 INT NULL, - field99 INT NULL, - field100 INT NULL, - field101 INT NULL, - field102 INT NULL, - field103 INT NULL, - field104 INT NULL, - field105 INT NULL, - field106 INT NULL, - field107 INT NULL, - field108 INT NULL, - field109 INT NULL, - field110 INT NULL, - field111 INT NULL, - field112 INT NULL, - field113 INT NULL, - field114 INT NULL, - field115 INT NULL, - field116 INT NULL, - field117 INT NULL, - field118 INT NULL, - field119 INT NULL, - field120 INT NULL, - field121 INT NULL, - field122 INT NULL, - field123 INT NULL, - field124 INT NULL, - field125 INT NULL, - field126 INT NULL, - field127 INT NULL, - field128 INT NULL, - field129 INT NULL, - field130 INT NULL, - field131 INT NULL, - field132 INT NULL, - field133 INT NULL, - field134 INT NULL, - field135 INT NULL, - field136 INT NULL, - field137 INT NULL, - field138 INT NULL, - field139 INT NULL, - field140 INT NULL, - field141 INT NULL, - field142 INT NULL, - field143 INT NULL, - field144 INT NULL, - field145 INT NULL, - field146 INT NULL, - field147 INT NULL, - field148 INT NULL, - field149 INT NULL, - field150 INT NULL, - field151 INT NULL, - field152 INT NULL, - field153 INT NULL, - field154 INT NULL, - field155 INT NULL, - field156 INT NULL, - field157 INT NULL, - field158 INT NULL, - field159 INT NULL, - field160 INT NULL, - field161 INT NULL, - field162 INT NULL, - field163 INT NULL, - field164 INT NULL, - field165 INT NULL, - field166 INT NULL, - field167 INT NULL, - field168 INT NULL, - field169 INT NULL, - field170 INT NULL, - field171 INT NULL, - field172 INT NULL, - field173 INT NULL, - field174 INT NULL, - field175 INT NULL, - field176 INT NULL, - field177 INT NULL, - field178 INT NULL, - field179 INT NULL, - field180 INT NULL, - - CONSTRAINT PK_x180column_target PRIMARY KEY (RowId, container), - CONSTRAINT FK_x180column_target_container FOREIGN KEY (container) REFERENCES core.containers (entityid) - ) -GO - -CREATE PROCEDURE etltest.etlTest - @transformRunId int, - @containerId entityid = NULL OUTPUT, - @rowsInserted int = 0 OUTPUT, - @rowsDeleted int = 0 OUTPUT, - @rowsModified int = 0 OUTPUT, - @returnMsg varchar(100) = 'default message' OUTPUT, - @debug varchar(1000) = '', - @filterRunId int = null, - @filterStartTimeStamp datetime = null, - @filterEndTimeStamp datetime = null, - @testMode int, - @testInOutParam varchar(10) = null OUTPUT, - @runCount int = 1 OUTPUT, - @previousFilterRunId int = null OUTPUT, - @previousFilterStartTimeStamp datetime = null OUTPUT, - @previousFilterEndTimeStamp datetime = null OUTPUT -AS -BEGIN - -/* - Test modes - 1 normal operation - 2 return code > 0 - 3 raise error - 4 input/output parameter persistence - 5 override of persisted input/output parameter - 6 Run filter strategy, require @filterRunId. Test persistence. - 7 Modified since filter strategy, require @filterStartTimeStamp & @filterEndTimeStamp. Test persistence. - -*/ - -IF @testMode IS NULL -BEGIN - SET @returnMsg = 'No testMode set' - RETURN 1 -END - -IF @testMode = 1 -BEGIN - print 'Test print statement logging' - SET @rowsInserted = 1 - SET @rowsDeleted = 2 - SET @rowsModified = 4 - SET @returnMsg = 'Test returnMsg logging' - RETURN 0 -END - -IF @testMode = 2 RETURN 1 - -IF @testMode = 3 -BEGIN - SET @returnMsg = 'Intentional SQL Exception From Inside Proc' - RAISERROR(@returnMsg, 11, 1) -END - -IF @testMode = 4 AND @testInOutParam != 'after' AND @runCount > 1 -BEGIN - SET @returnMsg = 'Expected value "after" for @testInOutParam on run count = ' + convert(varchar, @runCount) + ', but was ' + @testInOutParam - RETURN 1 -END - -IF @testMode = 5 AND @testInOutParam != 'before' AND @runCount > 1 -BEGIN - SET @returnMsg = 'Expected value "before" for @testInOutParam on run count = ' + convert(varchar, @runCount) + ', but was ' + @testInOutParam - RETURN 1 -END - -IF @testMode = 6 -BEGIN - IF @filterRunId IS NULL - BEGIN - SET @returnMsg = 'Required @filterRunId value not supplied' - RETURN 1 - END - IF @runCount > 1 AND (@previousFilterRunId IS NULL OR @previousFilterRunId <= @filterRunId) - BEGIN - SET @returnMsg = 'Required @filterRunId was not persisted from previous run.' - RETURN 1 - END - SET @previousFilterRunId = @filterRunId -END - -IF @testMode = 7 -BEGIN - IF @runCount > 1 AND (@previousFilterStartTimeStamp IS NULL OR @previousFilterEndTimeStamp IS NULL - OR @previousFilterStartTimeStamp <= @filterStartTimeStamp OR @previousFilterEndTimeStamp <= @filterEndTimeStamp) - BEGIN - SET @returnMsg = 'Required @filterStartTimeStamp or @filterEndTimeStamp were not persisted from previous run.' - RETURN 1 - END - SET @previousFilterStartTimeStamp = @filterStartTimeStamp - SET @previousFilterEndTimeStamp = @filterEndTimeStamp -END - --- set value for persistence tests -IF @testInOutParam IS NOT NULL SET @testInOutParam = 'after' - -RETURN 0 - -END -GO - -EXEC core.fn_dropifexists 'etlTestResultSet', 'etltest', 'PROCEDURE', NULL; - GO - CREATE PROCEDURE [etltest].[etlTestResultSet] - @transformRunId int, - @containerId varchar(100) = NULL OUTPUT, - @rowsInserted int = 0 OUTPUT, - @rowsDeleted int = 0 OUTPUT, - @rowsModified int = 0 OUTPUT, - @returnMsg varchar(100) = 'default message' OUTPUT, - @debug varchar(1000) = '', - @filterRunId int = null, - @filterStartTimeStamp datetime = null OUTPUT, - @filterEndTimeStamp datetime = null OUTPUT, - @testMode int, - @testInOutParam varchar(10) = null OUTPUT, - @runCount int = 1 OUTPUT, - @previousFilterRunId int = null OUTPUT, - @previousFilterStartTimeStamp datetime = null OUTPUT, - @previousFilterEndTimeStamp datetime = null OUTPUT - AS - BEGIN - - IF @testMode = 9 - BEGIN - SELECT * FROM etltest.source WHERE container = @containerId - END - - IF @testInOutParam IS NOT NULL SET @testInOutParam = 'after' - - RETURN 0 - - END - - GO - -ALTER PROCEDURE etltest.etlTest - @transformRunId int, - @containerId entityid = NULL OUTPUT, - @rowsInserted int = 0 OUTPUT, - @rowsDeleted int = 0 OUTPUT, - @rowsModified int = 0 OUTPUT, - @returnMsg varchar(100) = 'default message' OUTPUT, - @debug varchar(1000) = '', - @filterRunId int = null, - @filterStartTimeStamp datetime = null OUTPUT, - @filterEndTimeStamp datetime = null OUTPUT, - @testMode int, - @testInOutParam varchar(10) = null OUTPUT, - @runCount int = 1 OUTPUT, - @previousFilterRunId int = -1 OUTPUT, - @previousFilterStartTimeStamp datetime = null OUTPUT, - @previousFilterEndTimeStamp datetime = null OUTPUT -AS -BEGIN - -/* - Test modes - 1 normal operation - 2 return code > 0 - 3 raise error - 4 input/output parameter persistence - 5 override of persisted input/output parameter - 6 Run filter strategy, require @filterRunId. Test persistence. - 7 Modified since filter strategy, require @filterStartTimeStamp & @filterEndTimeStamp. Test persistence. - -*/ - -IF @testMode IS NULL -BEGIN - SET @returnMsg = 'No testMode set' - RETURN 1 -END - -IF @runCount IS NULL - SET @runCount = 1; - ELSE - SET @runCount = @runCount + 1; - -IF @testMode = 1 -BEGIN - print 'Test print statement logging' - SET @rowsInserted = 1 - SET @rowsDeleted = 2 - SET @rowsModified = 4 - SET @returnMsg = 'Test returnMsg logging' - RETURN 0 -END - -IF @testMode = 2 RETURN 1 - -IF @testMode = 3 -BEGIN - SET @returnMsg = 'Intentional SQL Exception From Inside Proc' - RAISERROR(@returnMsg, 11, 1) -END - -IF @testMode = 4 AND @testInOutParam != 'after' AND @runCount > 1 -BEGIN - SET @returnMsg = 'Expected value "after" for @testInOutParam on run count = ' + convert(varchar, @runCount) + ', but was ' + @testInOutParam - RETURN 1 -END - -IF @testMode = 5 AND @testInOutParam != 'before' AND @runCount > 1 -BEGIN - SET @returnMsg = 'Expected value "before" for @testInOutParam on run count = ' + convert(varchar, @runCount) + ', but was ' + @testInOutParam - RETURN 1 -END - -IF @testMode = 6 -BEGIN - IF @filterRunId IS NULL - BEGIN - SET @returnMsg = 'Required @filterRunId value not supplied' - RETURN 1 - END - IF @runCount > 1 AND (@previousFilterRunId IS NULL OR @previousFilterRunId >= @filterRunId) - BEGIN - SET @returnMsg = 'Required @filterRunId was not persisted from previous run.' - RETURN 1 - END - SET @previousFilterRunId = @filterRunId -END - -IF @testMode = 7 - BEGIN - IF @runCount > 1 AND (@filterStartTimeStamp IS NULL AND @filterEndTimeStamp IS NULL) - BEGIN - SET @returnMsg = 'Required filterStartTimeStamp or filterEndTimeStamp were not persisted from previous run.'; - RETURN 1; - END; - SET @filterStartTimeStamp = CURRENT_TIMESTAMP; - SET @filterEndTimeStamp = CURRENT_TIMESTAMP; - END; - -IF @testMode = 8 - - BEGIN - IF @runCount > 1 AND ((@previousFilterStartTimeStamp IS NULL AND @previousFilterEndTimeStamp IS NULL) - OR (@filterStartTimeStamp IS NULL AND @filterEndTimeStamp IS NULL)) - BEGIN - SET @returnMsg = 'Required filterStartTimeStamp or filterEndTimeStamp were not persisted from previous run.'; - RETURN 1; - END; - SET @previousFilterStartTimeStamp = coalesce(@filterStartTimeStamp, CURRENT_TIMESTAMP); - SET @previousFilterEndTimeStamp = coalesce(@filterEndTimeStamp, CURRENT_TIMESTAMP); - END; - --- set value for persistence tests -IF @testInOutParam IS NOT NULL AND @testInOutParam != '' SET @testInOutParam = 'after' - -RETURN 0 - -END -GO - -/* 24.xxx SQL scripts */ - -ALTER PROCEDURE etltest.etlTest - @transformRunId int, - @containerId entityid = NULL OUTPUT, - @rowsInserted int = 0 OUTPUT, - @rowsDeleted int = 0 OUTPUT, - @rowsModified int = 0 OUTPUT, - @returnMsg varchar(100) = 'default message' OUTPUT, - @debug varchar(1000) = '', - @filterRunId int = null, - @filterStartTimeStamp datetime = null OUTPUT, - @filterEndTimeStamp datetime = null OUTPUT, - @testMode int, - @testInOutParam varchar(10) = null OUTPUT, - @runCount int = 1 OUTPUT, - @previousFilterRunId int = -1 OUTPUT, - @previousFilterStartTimeStamp datetime = null OUTPUT, - @previousFilterEndTimeStamp datetime = null OUTPUT - AS -BEGIN - -/* - Test modes - 1 normal operation - 2 return code > 0 - 3 raise error - 4 input/output parameter persistence - 5 override of persisted input/output parameter - 6 Run filter strategy, require filterRunId. Test persistence. - 7 Modified since filter strategy, no source, require filterStartTimeStamp & filterEndTimeStamp, - populated from output of previous run - 8 Modified since filter strategy with source, require filterStartTimeStamp & filterEndTimeStamp - populated from the filter strategy IncrementalStartTime & IncrementalEndTime - 9 Sleep for 2 minutes before finishing -*/ - -IF @testMode IS NULL -BEGIN - SET @returnMsg = 'No testMode set' - RETURN 1 -END - -IF @runCount IS NULL - SET @runCount = 1; -ELSE - SET @runCount = @runCount + 1; - -IF @testMode = 1 -BEGIN - print 'Test print statement logging' - SET @rowsInserted = 1 - SET @rowsDeleted = 2 - SET @rowsModified = 4 - SET @returnMsg = 'Test returnMsg logging' - RETURN 0 -END - -IF @testMode = 2 RETURN 1 - -IF @testMode = 3 -BEGIN - SET @returnMsg = 'Intentional SQL Exception From Inside Proc' - RAISERROR(@returnMsg, 11, 1) -END - -IF @testMode = 4 AND @testInOutParam != 'after' AND @runCount > 1 -BEGIN - SET @returnMsg = 'Expected value "after" for @testInOutParam on run count = ' + convert(varchar, @runCount) + ', but was ' + @testInOutParam - RETURN 1 -END - -IF @testMode = 5 AND @testInOutParam != 'before' AND @runCount > 1 -BEGIN - SET @returnMsg = 'Expected value "before" for @testInOutParam on run count = ' + convert(varchar, @runCount) + ', but was ' + @testInOutParam - RETURN 1 -END - -IF @testMode = 6 -BEGIN - IF @filterRunId IS NULL -BEGIN - SET @returnMsg = 'Required @filterRunId value not supplied' - RETURN 1 -END - IF @runCount > 1 AND (@previousFilterRunId IS NULL OR @previousFilterRunId >= @filterRunId) -BEGIN - SET @returnMsg = 'Required @filterRunId was not persisted from previous run.' - RETURN 1 -END - SET @previousFilterRunId = @filterRunId -END - -IF @testMode = 7 -BEGIN - IF @runCount > 1 AND (@filterStartTimeStamp IS NULL AND @filterEndTimeStamp IS NULL) -BEGIN - SET @returnMsg = 'Required filterStartTimeStamp or filterEndTimeStamp were not persisted from previous run.'; -RETURN 1; -END; - SET @filterStartTimeStamp = CURRENT_TIMESTAMP; - SET @filterEndTimeStamp = CURRENT_TIMESTAMP; -END; - -IF @testMode = 8 - -BEGIN - IF @runCount > 1 AND ((@previousFilterStartTimeStamp IS NULL AND @previousFilterEndTimeStamp IS NULL) - OR (@filterStartTimeStamp IS NULL AND @filterEndTimeStamp IS NULL)) -BEGIN - SET @returnMsg = 'Required filterStartTimeStamp or filterEndTimeStamp were not persisted from previous run.'; -RETURN 1; -END; - SET @previousFilterStartTimeStamp = coalesce(@filterStartTimeStamp, CURRENT_TIMESTAMP); - SET @previousFilterEndTimeStamp = coalesce(@filterEndTimeStamp, CURRENT_TIMESTAMP); -END; - -IF @testMode = 9 -BEGIN - -- Sleep for 2 minutes - WAITFOR DELAY '00:02' - RETURN 1; -END; - --- set value for persistence tests -IF @testInOutParam IS NOT NULL AND @testInOutParam != '' SET @testInOutParam = 'after' - -RETURN 0 - -END -GO - -ALTER PROCEDURE etltest.etlTest - @transformRunId int, - @containerId entityid = NULL OUTPUT, - @rowsInserted int = 0 OUTPUT, - @rowsDeleted int = 0 OUTPUT, - @rowsModified int = 0 OUTPUT, - @returnMsg varchar(100) = 'default message' OUTPUT, - @debug varchar(1000) = '', - @filterRunId int = null, - @filterStartTimeStamp datetime = null OUTPUT, - @filterEndTimeStamp datetime = null OUTPUT, - @testMode int, - @testInOutParam varchar(10) = null OUTPUT, - @runCount int = 1 OUTPUT, - @previousFilterRunId int = -1 OUTPUT, - @previousFilterStartTimeStamp datetime = null OUTPUT, - @previousFilterEndTimeStamp datetime = null OUTPUT - AS -BEGIN - -/* - Test modes - 1 normal operation - 2 return code > 0 - 3 raise error - 4 input/output parameter persistence - 5 override of persisted input/output parameter - 6 Run filter strategy, require filterRunId. Test persistence. - 7 Modified since filter strategy, no source, require filterStartTimeStamp & filterEndTimeStamp, - populated from output of previous run - 8 Modified since filter strategy with source, require filterStartTimeStamp & filterEndTimeStamp - populated from the filter strategy IncrementalStartTime & IncrementalEndTime - 9 Sleep for 2 minutes before finishing -*/ - -IF @testMode IS NULL -BEGIN - SET @returnMsg = 'No testMode set' - RETURN 1 -END - -IF @runCount IS NULL - SET @runCount = 1; -ELSE - SET @runCount = @runCount + 1; - -IF @testMode = 1 -BEGIN - print 'Test print statement logging' - SET @rowsInserted = 1 - SET @rowsDeleted = 2 - SET @rowsModified = 4 - SET @returnMsg = 'Test returnMsg logging' - RETURN 0 -END - -IF @testMode = 2 RETURN 1 - -IF @testMode = 3 -BEGIN - SET @returnMsg = 'Intentional SQL Exception From Inside Proc' - RAISERROR(@returnMsg, 11, 1) -END - -IF @testMode = 4 AND @testInOutParam != 'after' AND @runCount > 1 -BEGIN - SET @returnMsg = 'Expected value "after" for @testInOutParam on run count = ' + convert(varchar, @runCount) + ', but was ' + @testInOutParam - RETURN 1 -END - -IF @testMode = 5 AND @testInOutParam != 'before' AND @runCount > 1 -BEGIN - SET @returnMsg = 'Expected value "before" for @testInOutParam on run count = ' + convert(varchar, @runCount) + ', but was ' + @testInOutParam - RETURN 1 -END - -IF @testMode = 6 -BEGIN - IF @filterRunId IS NULL -BEGIN - SET @returnMsg = 'Required @filterRunId value not supplied' - RETURN 1 -END - IF @runCount > 1 AND (@previousFilterRunId IS NULL OR @previousFilterRunId >= @filterRunId) -BEGIN - SET @returnMsg = 'Required @filterRunId was not persisted from previous run.' - RETURN 1 -END - SET @previousFilterRunId = @filterRunId -END - -IF @testMode = 7 -BEGIN - IF @runCount > 1 AND (@filterStartTimeStamp IS NULL AND @filterEndTimeStamp IS NULL) -BEGIN - SET @returnMsg = 'Required filterStartTimeStamp or filterEndTimeStamp were not persisted from previous run.'; -RETURN 1; -END; - SET @filterStartTimeStamp = CURRENT_TIMESTAMP; - SET @filterEndTimeStamp = CURRENT_TIMESTAMP; -END; - -IF @testMode = 8 - -BEGIN - IF @runCount > 1 AND ((@previousFilterStartTimeStamp IS NULL AND @previousFilterEndTimeStamp IS NULL) - OR (@filterStartTimeStamp IS NULL AND @filterEndTimeStamp IS NULL)) -BEGIN - SET @returnMsg = 'Required filterStartTimeStamp or filterEndTimeStamp were not persisted from previous run.'; -RETURN 1; -END; - SET @previousFilterStartTimeStamp = coalesce(@filterStartTimeStamp, CURRENT_TIMESTAMP); - SET @previousFilterEndTimeStamp = coalesce(@filterEndTimeStamp, CURRENT_TIMESTAMP); -END; - -IF @testMode = 9 -BEGIN - -- Sleep for 30 seconds - WAITFOR DELAY '00:00:30' - RETURN 1; -END; - --- set value for persistence tests -IF @testInOutParam IS NOT NULL AND @testInOutParam != '' SET @testInOutParam = 'after' - -RETURN 0 - -END -GO \ No newline at end of file diff --git a/modules/ETLtest/resources/schemas/etl test!schema.xml b/modules/ETLtest/resources/schemas/etl test!schema.xml index f915ee68c6..f6aa51c4d1 100644 --- a/modules/ETLtest/resources/schemas/etl test!schema.xml +++ b/modules/ETLtest/resources/schemas/etl test!schema.xml @@ -1,6 +1,7 @@ + created by the postgresql/etltest-26.000-26.001.sql dbscript. The SQL Server equivalent, for use + against an external data source, is resources/externalFixtures/sqlserver/. --> diff --git a/modules/chartingapi/module.properties b/modules/chartingapi/module.properties index 24d14ac54b..dc09ced1e0 100644 --- a/modules/chartingapi/module.properties +++ b/modules/chartingapi/module.properties @@ -1,3 +1,2 @@ ModuleClass: org.labkey.api.module.SimpleModule -SupportedDatabases: mssql, pgsql ManageVersion: true diff --git a/modules/crawlerTest/module.properties b/modules/crawlerTest/module.properties index 864249895d..05e11930ea 100644 --- a/modules/crawlerTest/module.properties +++ b/modules/crawlerTest/module.properties @@ -4,5 +4,4 @@ Description: Module with actions vulnerable to script injection. For validating URL: http://labkey.org License: Apache 2.0 LicenseURL: http://www.apache.org/licenses/LICENSE-2.0 -SupportedDatabases: mssql, pgsql ManageVersion: true diff --git a/modules/dumbster/module.properties b/modules/dumbster/module.properties index d03489d56c..d12d2666b8 100644 --- a/modules/dumbster/module.properties +++ b/modules/dumbster/module.properties @@ -4,5 +4,4 @@ Organization: LabKey OrganizationURL: https://www.labkey.com/ License: Apache 2.0 LicenseURL: http://www.apache.org/licenses/LICENSE-2.0 -SupportedDatabases: mssql, pgsql ManageVersion: true diff --git a/modules/footerTest/module.properties b/modules/footerTest/module.properties index 855345f682..567bab6017 100644 --- a/modules/footerTest/module.properties +++ b/modules/footerTest/module.properties @@ -3,5 +3,4 @@ Description: Enable testing of custom footer functionality URL: https://www.labkey.org License: Apache 2.0 LicenseURL: http://www.apache.org/licenses/LICENSE-2.0 -SupportedDatabases: mssql, pgsql ManageVersion: true diff --git a/modules/linkedschematest/module.properties b/modules/linkedschematest/module.properties index 24d14ac54b..dc09ced1e0 100644 --- a/modules/linkedschematest/module.properties +++ b/modules/linkedschematest/module.properties @@ -1,3 +1,2 @@ ModuleClass: org.labkey.api.module.SimpleModule -SupportedDatabases: mssql, pgsql ManageVersion: true diff --git a/modules/miniassay/module.properties b/modules/miniassay/module.properties index 24d14ac54b..dc09ced1e0 100644 --- a/modules/miniassay/module.properties +++ b/modules/miniassay/module.properties @@ -1,3 +1,2 @@ ModuleClass: org.labkey.api.module.SimpleModule -SupportedDatabases: mssql, pgsql ManageVersion: true diff --git a/modules/pipelinetest/module.properties b/modules/pipelinetest/module.properties index 24d14ac54b..dc09ced1e0 100644 --- a/modules/pipelinetest/module.properties +++ b/modules/pipelinetest/module.properties @@ -1,3 +1,2 @@ ModuleClass: org.labkey.api.module.SimpleModule -SupportedDatabases: mssql, pgsql ManageVersion: true diff --git a/modules/pipelinetest2/module.properties b/modules/pipelinetest2/module.properties index 24d14ac54b..dc09ced1e0 100644 --- a/modules/pipelinetest2/module.properties +++ b/modules/pipelinetest2/module.properties @@ -1,3 +1,2 @@ ModuleClass: org.labkey.api.module.SimpleModule -SupportedDatabases: mssql, pgsql ManageVersion: true diff --git a/modules/restrictedModule/module.properties b/modules/restrictedModule/module.properties index 24d14ac54b..dc09ced1e0 100644 --- a/modules/restrictedModule/module.properties +++ b/modules/restrictedModule/module.properties @@ -1,3 +1,2 @@ ModuleClass: org.labkey.api.module.SimpleModule -SupportedDatabases: mssql, pgsql ManageVersion: true diff --git a/modules/scriptpad/module.properties b/modules/scriptpad/module.properties index 24d14ac54b..dc09ced1e0 100644 --- a/modules/scriptpad/module.properties +++ b/modules/scriptpad/module.properties @@ -1,3 +1,2 @@ ModuleClass: org.labkey.api.module.SimpleModule -SupportedDatabases: mssql, pgsql ManageVersion: true diff --git a/modules/simpletest/module.properties b/modules/simpletest/module.properties index 910a75b470..835924bd29 100644 --- a/modules/simpletest/module.properties +++ b/modules/simpletest/module.properties @@ -1,4 +1,3 @@ Name: simpletest SchemaVersion: 26.000 -SupportedDatabases: mssql, pgsql ManageVersion: true diff --git a/modules/simpletest/resources/schemas/dbscripts/sqlserver/vehicle-0.000-23.000.sql b/modules/simpletest/resources/schemas/dbscripts/sqlserver/vehicle-0.000-23.000.sql deleted file mode 100644 index b8d7d6ea3c..0000000000 --- a/modules/simpletest/resources/schemas/dbscripts/sqlserver/vehicle-0.000-23.000.sql +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (c) 2024-2026 LabKey Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -CREATE SCHEMA vehicle; -GO - -CREATE TABLE vehicle.Colors -( - Name NVARCHAR(30) NOT NULL, - Hex TEXT, - - CONSTRAINT PK_Colors PRIMARY KEY (Name) -); - -ALTER TABLE vehicle.Colors ADD TriggerScriptProperty NVARCHAR(100); - -CREATE TABLE vehicle.Manufacturers -( - RowId INT IDENTITY(1,1), - Name NVARCHAR(255) NOT NULL, - - CONSTRAINT PK_Manufacturers PRIMARY KEY (RowId) -); - -CREATE TABLE vehicle.Models -( - RowId INT IDENTITY(1,1), - ManufacturerId INT NOT NULL, - Name NVARCHAR(255) NOT NULL, - - CONSTRAINT PK_Models PRIMARY KEY (RowId), - CONSTRAINT FK_Models_Manufacturers FOREIGN KEY (ManufacturerId) REFERENCES vehicle.Manufacturers(RowId) -); - -ALTER TABLE vehicle.Models ADD InitialReleaseYear INT; -ALTER TABLE vehicle.Models ADD ThumbnailImage NVARCHAR(60); -ALTER TABLE vehicle.Models ADD Image NVARCHAR(60); -ALTER TABLE vehicle.Models ADD PopupImage NVARCHAR(60); - -CREATE TABLE vehicle.Vehicles -( - RowId INT IDENTITY(1,1) NOT NULL, - Container ENTITYID NOT NULL, - CreatedBy USERID NOT NULL, - Created DATETIME NOT NULL, - ModifiedBy USERID NOT NULL, - Modified DATETIME NOT NULL, - - ModelId INT NOT NULL, - Color NVARCHAR(30) NOT NULL, - - ModelYear INT NOT NULL, - Milage INT NOT NULL, - LastService DATETIME NOT NULL, - - CONSTRAINT PK_Vehicles PRIMARY KEY (RowId), - CONSTRAINT FK_Vehicles_Models FOREIGN KEY (ModelId) REFERENCES vehicle.Models(RowId), - CONSTRAINT FK_Vehicles_Colors FOREIGN KEY (Color) REFERENCES vehicle.Colors(Name) -); - --- add container constraint -ALTER TABLE vehicle.Vehicles ADD CONSTRAINT FK_Vehicles_Container FOREIGN KEY (Container) REFERENCES core.Containers (EntityId); -ALTER TABLE vehicle.Vehicles ADD TriggerScriptContainer ENTITYID; - -CREATE TABLE vehicle.emissiontest ( - rowid int identity(1,1), - name varchar(100), - container entityid, - parentTest int, - vehicleId int, - result bit, - - CONSTRAINT PK_emissiontest PRIMARY KEY (rowid), - CONSTRAINT FK_emissiontest_container FOREIGN KEY (container) REFERENCES core.containers (entityid) -); - -CREATE TABLE vehicle.FirstFKTable -( - RowId INT IDENTITY(1,1), - StartCycleCol INT NOT NULL UNIQUE, - CONSTRAINT PK_FirstFKTable PRIMARY KEY (RowId) -); - -CREATE TABLE vehicle.SecondFKTable -( - RowId INT IDENTITY(1,1), - StartCycleCol INT NOT NULL UNIQUE, - CycleCol INT NOT NULL UNIQUE, - - CONSTRAINT PK_SecondFKTable PRIMARY KEY (RowId) -); - -ALTER TABLE vehicle.FirstFKTable ADD CONSTRAINT FK_SecondFKTable_StartCycleCol FOREIGN KEY (StartCycleCol) REFERENCES vehicle.SecondFKTable (StartCycleCol); - -CREATE TABLE vehicle.ThirdFKTable -( - RowId INT IDENTITY(1,1), - CycleCol INT NOT NULL UNIQUE, - - CONSTRAINT PK_ThirdFKTable PRIMARY KEY (RowId) -); - -ALTER TABLE vehicle.SecondFKTable ADD CONSTRAINT FK_ThirdFKTable_CycleCol FOREIGN KEY (CycleCol) REFERENCES vehicle.ThirdFKTable (CycleCol); -ALTER TABLE vehicle.ThirdFKTable ADD CONSTRAINT FK_SecondFKTable_CycleCol FOREIGN KEY (CycleCol) REFERENCES vehicle.SecondFKTable (CycleCol); diff --git a/modules/simpletest/resources/schemas/dbscripts/sqlserver/vehicle-25.000-25.001.sql b/modules/simpletest/resources/schemas/dbscripts/sqlserver/vehicle-25.000-25.001.sql deleted file mode 100644 index 8a0f8e5b5d..0000000000 --- a/modules/simpletest/resources/schemas/dbscripts/sqlserver/vehicle-25.000-25.001.sql +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Copyright (c) 2025-2026 LabKey Corporation - * - * Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0 - */ -CREATE UNIQUE INDEX AK_Name ON vehicle.Manufacturers (Name); \ No newline at end of file diff --git a/modules/simpletest/resources/schemas/dbscripts/sqlserver/vehicle-25.001-25.002.sql b/modules/simpletest/resources/schemas/dbscripts/sqlserver/vehicle-25.001-25.002.sql deleted file mode 100644 index 055c6a30ec..0000000000 --- a/modules/simpletest/resources/schemas/dbscripts/sqlserver/vehicle-25.001-25.002.sql +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2025-2026 LabKey Corporation - * - * Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0 - */ -DROP TABLE IF EXISTS vehicle.OwnedVehicles; -DROP TABLE IF EXISTS vehicle.Owners; - -CREATE TABLE vehicle.Owners -( - RowId BIGINT IDENTITY(2147483648,1) NOT NULL, - Name VARCHAR(100) NOT NULL, - - CONSTRAINT PK_Owners PRIMARY KEY (RowId) -); - -CREATE TABLE vehicle.OwnedVehicles -( - RowId BIGINT IDENTITY(4294967296,1) NOT NULL, - Owner BIGINT NOT NULL, - Vehicle INT NOT NULL, - - CONSTRAINT PK_OwnedVehicles PRIMARY KEY (RowId) -); \ No newline at end of file diff --git a/modules/triggerTestModule/module.properties b/modules/triggerTestModule/module.properties index 24d14ac54b..dc09ced1e0 100644 --- a/modules/triggerTestModule/module.properties +++ b/modules/triggerTestModule/module.properties @@ -1,3 +1,2 @@ ModuleClass: org.labkey.api.module.SimpleModule -SupportedDatabases: mssql, pgsql ManageVersion: true diff --git a/src/org/labkey/test/components/ManageSampleStatusesPanel.java b/src/org/labkey/test/components/ManageSampleStatusesPanel.java index 4b7b6547ef..4fde3d1b04 100644 --- a/src/org/labkey/test/components/ManageSampleStatusesPanel.java +++ b/src/org/labkey/test/components/ManageSampleStatusesPanel.java @@ -257,7 +257,6 @@ public ManageSampleStatusesPanel addStatus(String label, String description, Sam elementCache().saveButton.click(); - // Don't know why but on MSSQL/Windows in TC this is taking a long time to complete. WebDriverWrapper.waitFor(()->elementCache().deleteButton.isDisplayed(), "Delete button did not become visible after adding a status.", 5_000); diff --git a/src/org/labkey/test/tests/DataClassTest.java b/src/org/labkey/test/tests/DataClassTest.java index 91b905ab65..ef32234537 100644 --- a/src/org/labkey/test/tests/DataClassTest.java +++ b/src/org/labkey/test/tests/DataClassTest.java @@ -52,7 +52,6 @@ public class DataClassTest extends BaseWebDriverTest { private static final String PROJECT_NAME = "DataClassTestProject"; - boolean IS_POSTGRES = WebTestHelper.getDatabaseType() == WebTestHelper.DatabaseType.PostgreSQL; @Override public List getAssociatedModules() @@ -445,10 +444,8 @@ private void verifyTableIndices(String prefix, List indexSuffixes) private void verifyTableIndexNonUnique(String prefix, String suffix, boolean isUnique) { - String boolDisplay = isUnique ? "0" : "1"; - if (IS_POSTGRES) boolDisplay = isUnique ? "false" : "true"; - String fieldKey = prefix + suffix; - if (IS_POSTGRES) fieldKey = fieldKey.toLowerCase(); + String boolDisplay = isUnique ? "false" : "true"; + String fieldKey = (prefix + suffix).toLowerCase(); Locator locator = Locator.xpath("//td[contains(text(), '" + fieldKey + "')]/preceding-sibling::td[2][text()='" + boolDisplay + "']"); checker().verifyTrue("Non_Unique value not as expected in metadata for locator: " + locator, locator.existsIn(getDriver())); } diff --git a/src/org/labkey/test/tests/DomainFieldTypeChangeTest.java b/src/org/labkey/test/tests/DomainFieldTypeChangeTest.java index d407e99f38..86c7af788a 100644 --- a/src/org/labkey/test/tests/DomainFieldTypeChangeTest.java +++ b/src/org/labkey/test/tests/DomainFieldTypeChangeTest.java @@ -24,7 +24,6 @@ import org.labkey.test.BaseWebDriverTest; import org.labkey.test.Locator; import org.labkey.test.TestFileUtils; -import org.labkey.test.WebTestHelper; import org.labkey.test.categories.Daily; import org.labkey.test.components.DomainDesignerPage; import org.labkey.test.components.assay.AssayConstants; @@ -154,12 +153,8 @@ public void testProvisionedDomainFieldChanges() throws IOException, CommandExcep table.getColumnDataAsText(decimalField.getName())); checker().verifyEquals("Incorrect values after changing boolean to string", Arrays.asList("yes", "no", "yes", "NewTrue"), table.getColumnDataAsText(booleanField.getName())); - if (WebTestHelper.getDatabaseType() == WebTestHelper.DatabaseType.MicrosoftSQLServer) - checker().verifyEquals("Incorrect values after changing date to string", Arrays.asList("Jan 1 2022 12:00AM", "Jan 2 2022 12:00AM", "Jan 3 2022 12:00AM", "New01-02-2022"), - table.getColumnDataAsText(dateField.getName())); - else - checker().verifyEquals("Incorrect values after changing date to string", Arrays.asList("2022-01-01 00:00:00", "2022-01-02 00:00:00", "2022-01-03 00:00:00", "New01-02-2022"), - table.getColumnDataAsText(dateField.getName())); + checker().verifyEquals("Incorrect values after changing date to string", Arrays.asList("2022-01-01 00:00:00", "2022-01-02 00:00:00", "2022-01-03 00:00:00", "New01-02-2022"), + table.getColumnDataAsText(dateField.getName())); } @Test @@ -231,12 +226,8 @@ public void testNonProvisionedDomainFieldChanges() table.getColumnDataAsText("runTestBoolean")); checker().verifyEquals("Batch fields : Incorrect value after changing Decimal to string", Arrays.asList("1.1"), table.getColumnDataAsText("Batch/batchTestDecimal")); - if (WebTestHelper.getDatabaseType() == WebTestHelper.DatabaseType.MicrosoftSQLServer) - checker().verifyEquals("Batch fields : Incorrect value after changing Date to string", Arrays.asList("Jan 1 2022 12:00AM"), - table.getColumnDataAsText("Batch/batchTestDate")); - else - checker().verifyEquals("Batch fields : Incorrect value after changing Date to string", Arrays.asList("2022-01-01 00:00:00"), - table.getColumnDataAsText("Batch/batchTestDate")); + checker().verifyEquals("Batch fields : Incorrect value after changing Date to string", Arrays.asList("2022-01-01 00:00:00"), + table.getColumnDataAsText("Batch/batchTestDate")); checker().screenShotIfNewError("AfterRunAndBatchChanges"); diff --git a/src/org/labkey/test/tests/ExternalSchemaTest.java b/src/org/labkey/test/tests/ExternalSchemaTest.java index 218e901783..302b53ec15 100644 --- a/src/org/labkey/test/tests/ExternalSchemaTest.java +++ b/src/org/labkey/test/tests/ExternalSchemaTest.java @@ -238,22 +238,6 @@ protected String getProjectName() @Test public void testSteps() throws Exception { -// TODO: Test an external schema without applying metadata; verify that table and column names match JDBC meta -// data casing, which will differ between PostgreSQL and SQL Server. Use code like the below to distinguish. -// -// // External schemas report JDBC names, so we expect different casing on PostgreSQL vs. Microsoft SQL Server -// switch (WebTestHelper.getDatabaseType()) -// { -// case PostgreSQL: -// TABLE_NAME = "testtable"; -// break; -// case MicrosoftSQLServer: -// TABLE_NAME = "TestTable"; -// break; -// default: -// throw new IllegalStateException("Unknown database type"); -// } -// ensureExternalSchema(PROJECT_NAME); doTestContainer(); diff --git a/src/org/labkey/test/tests/GpatAssayTest.java b/src/org/labkey/test/tests/GpatAssayTest.java index 4c61e8a2c9..82d6c9ecba 100644 --- a/src/org/labkey/test/tests/GpatAssayTest.java +++ b/src/org/labkey/test/tests/GpatAssayTest.java @@ -501,15 +501,7 @@ public void testUpdateAssayDesign() throws IOException, CommandException checker().verifyEquals(String.format("Value in column '%s' is not as expected.", runDate), expectedText, rowMap.get(runDate)); - // Converting a date, time or dateTime field to String will be different between MSSQL and postgres. - if (WebTestHelper.getDatabaseType() == WebTestHelper.DatabaseType.MicrosoftSQLServer) - { - expectedText = "Jan 1 1970 " + new SimpleDateFormat("h:mma").format(date); - } - else - { - expectedText = "1970-01-01 " + defaultTimeFormat.format(date); - } + expectedText = "1970-01-01 " + defaultTimeFormat.format(date); checker().verifyEquals(String.format("Value in column '%s' is not as expected.", runTime), expectedText, rowMap.get(runTime)); diff --git a/src/org/labkey/test/tests/MultiValueTextChoiceSampleTypeTest.java b/src/org/labkey/test/tests/MultiValueTextChoiceSampleTypeTest.java index f64740e856..c40e4391d8 100644 --- a/src/org/labkey/test/tests/MultiValueTextChoiceSampleTypeTest.java +++ b/src/org/labkey/test/tests/MultiValueTextChoiceSampleTypeTest.java @@ -32,7 +32,6 @@ import org.labkey.test.util.DataRegionTable; import org.labkey.test.util.DomainUtils; import org.labkey.test.util.PortalHelper; -import org.labkey.test.util.PostgresOnlyTest; import org.labkey.test.util.TestDataGenerator; import org.labkey.test.util.exp.SampleTypeAPIHelper; @@ -50,7 +49,7 @@ import static org.labkey.test.util.TestDataGenerator.shuffleSelect; @Category({Daily.class}) -public class MultiValueTextChoiceSampleTypeTest extends BaseWebDriverTest implements PostgresOnlyTest +public class MultiValueTextChoiceSampleTypeTest extends BaseWebDriverTest { private static final String SUB_FOLDER = "ChildFolder_MultiValueTextChoice_SampleType_Test"; private final String SUB_FOLDER_PATH = getProjectName() + "/" + SUB_FOLDER; diff --git a/src/org/labkey/test/tests/PostgresQueriesTest.java b/src/org/labkey/test/tests/PostgresQueriesTest.java index 3467df34b0..05602fc4f1 100644 --- a/src/org/labkey/test/tests/PostgresQueriesTest.java +++ b/src/org/labkey/test/tests/PostgresQueriesTest.java @@ -27,7 +27,6 @@ import org.labkey.test.categories.Daily; import org.labkey.test.pages.LabkeyErrorPage; import org.labkey.test.util.DataRegionTable; -import org.labkey.test.util.PostgresOnlyTest; import java.io.IOException; import java.util.List; @@ -40,7 +39,7 @@ @Category({Daily.class}) @BaseWebDriverTest.ClassTimeout(minutes = 3) -public class PostgresQueriesTest extends AbstractAdminConsoleTest implements PostgresOnlyTest +public class PostgresQueriesTest extends AbstractAdminConsoleTest { @Test diff --git a/src/org/labkey/test/tests/SampleTypeDesignerStressTest.java b/src/org/labkey/test/tests/SampleTypeDesignerStressTest.java index 69977a2eea..43dbac09c1 100644 --- a/src/org/labkey/test/tests/SampleTypeDesignerStressTest.java +++ b/src/org/labkey/test/tests/SampleTypeDesignerStressTest.java @@ -28,7 +28,6 @@ import org.labkey.test.params.FieldInfo; import org.labkey.test.params.experiment.SampleTypeDefinition; import org.labkey.test.util.PortalHelper; -import org.labkey.test.util.PostgresOnlyTest; import org.labkey.test.util.SampleTypeHelper; import org.labkey.test.util.exp.SampleTypeAPIHelper; import org.labkey.test.util.query.QueryApiHelper; @@ -43,7 +42,7 @@ import java.util.Random; @Category({Daily.class}) -public class SampleTypeDesignerStressTest extends BaseWebDriverTest implements PostgresOnlyTest +public class SampleTypeDesignerStressTest extends BaseWebDriverTest { private static final String PROJECT_NAME = "SampleType Designer Stress Test"; diff --git a/src/org/labkey/test/tests/SampleTypeRenameTest.java b/src/org/labkey/test/tests/SampleTypeRenameTest.java index 380a78728a..de183ee231 100644 --- a/src/org/labkey/test/tests/SampleTypeRenameTest.java +++ b/src/org/labkey/test/tests/SampleTypeRenameTest.java @@ -22,7 +22,6 @@ import org.labkey.remoteapi.CommandException; import org.labkey.test.BaseWebDriverTest; import org.labkey.test.Locator; -import org.labkey.test.WebTestHelper; import org.labkey.test.categories.Daily; import org.labkey.test.components.ChartTypeDialog; import org.labkey.test.components.CustomizeView; @@ -132,21 +131,15 @@ public void testSampleTypeFieldRename() throws IOException, CommandException updatePage.setNameExpression("S-${genId}"); updatePage.clickSave(); - //Issue 51979: BadSqlGrammarException indexing sample types immediately after a field rename - // This issue has been fixed in Postgres but continues to fail in MSSQL. Many attempts were made to fix in - // MSSQL, but it was decided not to spend any more time on it (for MSSQL). - // Only do these other "rapid fire" updates if on Postgre. - if (WebTestHelper.getDatabaseType() == WebTestHelper.DatabaseType.PostgreSQL) - { - goToProjectHome(); - updatePage = sampleHelper.goToEditSampleType(sampleTypeName); - updatePage.getFieldsPanel().getField(FIELD_INT + " Updated").setName(FIELD_INT + " 2nd update"); - updatePage.clickSave(); - goToProjectHome(); - updatePage = sampleHelper.goToEditSampleType(sampleTypeName); - updatePage.getFieldsPanel().getField(FIELD_INT + " 2nd update").setName(FIELD_INT + " 3rd"); - updatePage.clickSave(); - } + // Issue 51979: BadSqlGrammarException indexing sample types immediately after a field rename + goToProjectHome(); + updatePage = sampleHelper.goToEditSampleType(sampleTypeName); + updatePage.getFieldsPanel().getField(FIELD_INT + " Updated").setName(FIELD_INT + " 2nd update"); + updatePage.clickSave(); + goToProjectHome(); + updatePage = sampleHelper.goToEditSampleType(sampleTypeName); + updatePage.getFieldsPanel().getField(FIELD_INT + " 2nd update").setName(FIELD_INT + " 3rd"); + updatePage.clickSave(); SearchAdminAPIHelper.waitForIndexer(); diff --git a/src/org/labkey/test/tests/SampleTypeTest.java b/src/org/labkey/test/tests/SampleTypeTest.java index 956932ba6d..dbd6b9b6c2 100644 --- a/src/org/labkey/test/tests/SampleTypeTest.java +++ b/src/org/labkey/test/tests/SampleTypeTest.java @@ -107,7 +107,6 @@ public class SampleTypeTest extends BaseWebDriverTest private static final String LOWER_CASE_SAMPLE_TYPE = CASE_INSENSITIVE_SAMPLE_TYPE.toLowerCase(); private static final String UPPER_CASE_SAMPLE_TYPE = CASE_INSENSITIVE_SAMPLE_TYPE.toUpperCase(); private static final TestUser USER_FOR_FILTERTEST = new TestUser("filter_user@sampletypetest.test"); - boolean IS_POSTGRES = WebTestHelper.getDatabaseType() == WebTestHelper.DatabaseType.PostgreSQL; @Override public List getAssociatedModules() @@ -2105,10 +2104,8 @@ private void verifyTableIndices(String prefix, List indexSuffixes) private void verifyTableIndexNonUnique(String prefix, String suffix, boolean isUnique) { - String boolDisplay = isUnique ? "0" : "1"; - if (IS_POSTGRES) boolDisplay = isUnique ? "false" : "true"; - String fieldKey = prefix + suffix; - if (IS_POSTGRES) fieldKey = fieldKey.toLowerCase(); + String boolDisplay = isUnique ? "false" : "true"; + String fieldKey = (prefix + suffix).toLowerCase(); Locator locator = Locator.xpath("//td[contains(text(), '" + fieldKey + "')]/preceding-sibling::td[2][text()='" + boolDisplay + "']"); checker().verifyTrue("Non_Unique value not as expected in metadata for locator: " + locator, locator.existsIn(getDriver())); } diff --git a/src/org/labkey/test/tests/TextChoiceImportExportAndOtherDomainsTest.java b/src/org/labkey/test/tests/TextChoiceImportExportAndOtherDomainsTest.java index e4e2afa03f..fe19afa2b7 100644 --- a/src/org/labkey/test/tests/TextChoiceImportExportAndOtherDomainsTest.java +++ b/src/org/labkey/test/tests/TextChoiceImportExportAndOtherDomainsTest.java @@ -116,16 +116,13 @@ private void doSetup() *

* This test will: *

    - *
  • Create a list design with a TextChoice field and optionally a MultiValueTextChoice field.
  • + *
  • Create a list design with a TextChoice field and a MultiValueTextChoice field.
  • *
  • Import list data in bulk.
  • *
  • Add a new list item using the UI.
  • *
*

- * - * @param includeMvtc If true, include a {@link FieldDefinition.ColumnType#MultiValueTextChoice} field - * in the list and populate it. Only supported on PostgreSQL. */ - private void verifyTextChoiceInList(boolean includeMvtc) + private void verifyTextChoiceInList() { FieldDefinition tcField = new FieldDefinition(LIST_TC_FIELD, FieldDefinition.ColumnType.TextChoice); @@ -134,23 +131,13 @@ private void verifyTextChoiceInList(boolean includeMvtc) FieldDefinition txtField = new FieldDefinition(LIST_TEXT_FIELD, FieldDefinition.ColumnType.String); final String allMVTCValues = StringUtils.join(LIST_MVTC_VALUES, ", "); - if (includeMvtc) - { - FieldDefinition mvtcField = new FieldDefinition(LIST_MVTC_FIELD, FieldDefinition.ColumnType.MultiValueTextChoice); - mvtcField.setMultiChoiceValues(LIST_MVTC_VALUES); + FieldDefinition mvtcField = new FieldDefinition(LIST_MVTC_FIELD, FieldDefinition.ColumnType.MultiValueTextChoice); + mvtcField.setMultiChoiceValues(LIST_MVTC_VALUES); - log(String.format("Create a list named '%s' with a string field '%s', a TextChoice field '%s', and a MultiValueTextChoice field '%s'.", - LIST_NAME, LIST_TEXT_FIELD, LIST_TC_FIELD, LIST_MVTC_FIELD)); + log(String.format("Create a list named '%s' with a string field '%s', a TextChoice field '%s', and a MultiValueTextChoice field '%s'.", + LIST_NAME, LIST_TEXT_FIELD, LIST_TC_FIELD, LIST_MVTC_FIELD)); - _listHelper.createList(getCurrentContainerPath(), LIST_NAME, "Key", tcField, txtField, mvtcField); - } - else - { - log(String.format("Create a list named '%s' with a string field '%s' and a TextChoice field '%s'.", - LIST_NAME, LIST_TEXT_FIELD, LIST_TC_FIELD)); - - _listHelper.createList(getCurrentContainerPath(), LIST_NAME, "Key", tcField, txtField); - } + _listHelper.createList(getCurrentContainerPath(), LIST_NAME, "Key", tcField, txtField, mvtcField); log("Bulk upload data into the list."); @@ -160,23 +147,11 @@ private void verifyTextChoiceInList(boolean includeMvtc) listData.add(Map.of(LIST_TC_FIELD, LIST_VALUES.get(2), LIST_TEXT_FIELD, "Is")); StringBuilder sb = new StringBuilder(); - if (includeMvtc) - { - sb.append(String.format("%s\t%s\t%s\n", LIST_TC_FIELD, LIST_TEXT_FIELD, LIST_MVTC_FIELD)); - for (int i = 0; i < listData.size(); i++) - { - Map row = listData.get(i); - sb.append(String.format("%s\t%s\t%s\n", row.get(LIST_TC_FIELD), row.get(LIST_TEXT_FIELD), allMVTCValues)); - listMvtcData.add(LIST_MVTC_VALUES); - } - } - else + sb.append(String.format("%s\t%s\t%s\n", LIST_TC_FIELD, LIST_TEXT_FIELD, LIST_MVTC_FIELD)); + for (Map row : listData) { - sb.append(String.format("%s\t%s\n", LIST_TC_FIELD, LIST_TEXT_FIELD)); - for (Map row : listData) - { - sb.append(String.format("%s\t%s\n", row.get(LIST_TC_FIELD), row.get(LIST_TEXT_FIELD))); - } + sb.append(String.format("%s\t%s\t%s\n", row.get(LIST_TC_FIELD), row.get(LIST_TEXT_FIELD), allMVTCValues)); + listMvtcData.add(LIST_MVTC_VALUES); } _listHelper.uploadData(sb.toString()); @@ -186,8 +161,7 @@ private void verifyTextChoiceInList(boolean includeMvtc) // Add the new row to the expected data. listData.add(newRow); - if (includeMvtc) - listMvtcData.add(List.of()); // No MVTC value for the UI-inserted row. + listMvtcData.add(List.of()); // No MVTC value for the UI-inserted row. log("Add a new row to the list using the UI."); _listHelper.insertNewRow(newRow); @@ -260,8 +234,6 @@ private void verifyTextChoiceInIssueDesign() @Test public void testOtherDomainsExportAndImport() throws IOException, CommandException { - boolean isPg = WebTestHelper.getDatabaseType() == WebTestHelper.DatabaseType.PostgreSQL; - goToProjectHome(); log("Create a sample type, assay design and an assay run. These will be used to validate export/import."); @@ -274,7 +246,7 @@ public void testOtherDomainsExportAndImport() throws IOException, CommandExcepti Map assayResultRowData = createAssayRun(); log("Create a list with a TextChoice field. The list will also be validated after import."); - verifyTextChoiceInList(isPg); + verifyTextChoiceInList(); log("Create an issue design with a TextChoice field and create an issue that uses it. Issue designs are not exported."); verifyTextChoiceInIssueDesign(); @@ -308,10 +280,7 @@ public void testOtherDomainsExportAndImport() throws IOException, CommandExcepti Connection cn = WebTestHelper.getRemoteApiConnection(); SelectRowsCommand cmd = new SelectRowsCommand("lists", LIST_NAME); - List selectColumns = new ArrayList<>(Arrays.asList(LIST_TC_FIELD, LIST_TEXT_FIELD)); - if (isPg) - selectColumns.add(LIST_MVTC_FIELD); - cmd.setColumns(selectColumns); + cmd.setColumns(List.of(LIST_TC_FIELD, LIST_TEXT_FIELD, LIST_MVTC_FIELD)); SelectRowsResponse response = cmd.execute(cn, getCurrentContainerPath()); @@ -323,21 +292,17 @@ public void testOtherDomainsExportAndImport() throws IOException, CommandExcepti Map.of(LIST_TC_FIELD, row.get(LIST_TC_FIELD).toString(), LIST_TEXT_FIELD, row.get(LIST_TEXT_FIELD).toString())); - if (isPg) - { - Object mvtcRaw = row.get(LIST_MVTC_FIELD); - List mvtcValues = mvtcRaw instanceof List list - ? list.stream().map(Object::toString).toList() - : List.of(); - importedListMvtcData.add(mvtcValues); - } + Object mvtcRaw = row.get(LIST_MVTC_FIELD); + List mvtcValues = mvtcRaw instanceof List list + ? list.stream().map(Object::toString).toList() + : List.of(); + importedListMvtcData.add(mvtcValues); } checker().withScreenshot("Imported_List_Error") .verifyEquals("Imported data for the list not as expected.", listData, importedListData); - if (isPg) - checker().verifyEquals("Imported MultiValueTextChoice data for the list not as expected.", listMvtcData, importedListMvtcData); + checker().verifyEquals("Imported MultiValueTextChoice data for the list not as expected.", listMvtcData, importedListMvtcData); log("Validate the assay data."); goToProjectHome(IMPORTED_PROJ_NAME); diff --git a/src/org/labkey/test/tests/assay/AssayTransformImportUpdateTest.java b/src/org/labkey/test/tests/assay/AssayTransformImportUpdateTest.java index bcb8f88d20..47d64e0852 100644 --- a/src/org/labkey/test/tests/assay/AssayTransformImportUpdateTest.java +++ b/src/org/labkey/test/tests/assay/AssayTransformImportUpdateTest.java @@ -16,14 +16,12 @@ package org.labkey.test.tests.assay; import org.assertj.core.api.Assertions; -import org.junit.Assume; import org.junit.Test; import org.junit.experimental.categories.Category; import org.labkey.remoteapi.CommandException; import org.labkey.test.BaseWebDriverTest; import org.labkey.test.Locator; import org.labkey.test.TestFileUtils; -import org.labkey.test.WebTestHelper; import org.labkey.test.categories.Assays; import org.labkey.test.categories.Daily; import org.labkey.test.components.assay.AssayConstants; @@ -344,9 +342,6 @@ private long getPackageUsageCount(String featureArea, String packageName) throws @Test public void testCancelAsyncAssayTransformJob() throws Exception { - Assume.assumeTrue("Issue 53240: User cannot cancel pipeline job on SQL", - WebTestHelper.getDatabaseType() != WebTestHelper.DatabaseType.MicrosoftSQLServer); - String transformCancelFile = "importCancelTransform.R"; String importCancelTransformAssay = "importCancelTransformAssay"; String transformContent = """ diff --git a/src/org/labkey/test/tests/component/GridPanelViewTest.java b/src/org/labkey/test/tests/component/GridPanelViewTest.java index 2aeb863686..268a29c686 100644 --- a/src/org/labkey/test/tests/component/GridPanelViewTest.java +++ b/src/org/labkey/test/tests/component/GridPanelViewTest.java @@ -17,7 +17,6 @@ import org.assertj.core.api.Assertions; import org.jetbrains.annotations.Nullable; -import org.junit.Assume; import org.junit.BeforeClass; import org.junit.Test; import org.junit.experimental.categories.Category; @@ -31,7 +30,6 @@ import org.labkey.test.Locator; import org.labkey.test.SortDirection; import org.labkey.test.WebTestHelper; -import org.labkey.test.WebTestHelper.DatabaseType; import org.labkey.test.categories.Daily; import org.labkey.test.components.CustomizeView; import org.labkey.test.components.bootstrap.ModalDialog; @@ -98,10 +96,7 @@ public class GridPanelViewTest extends GridPanelBaseTest public static final List TEXT_MULTI_CHOICE_LIST = randomTextChoice(10, ";"); public static final String COL_MULTITEXTCHOICE = "Multi Choice"; - private static final boolean MULTI_CHOICE_ENABLED = WebTestHelper.getDatabaseType() == DatabaseType.PostgreSQL; - private static final List DEFAULT_COLUMNS = MULTI_CHOICE_ENABLED - ? Arrays.asList(COL_NAME, COL_INT, COL_STRING1, COL_STRING2, COL_BOOL, COL_MULTITEXTCHOICE) - : Arrays.asList(COL_NAME, COL_INT, COL_STRING1, COL_STRING2, COL_BOOL); + private static final List DEFAULT_COLUMNS = Arrays.asList(COL_NAME, COL_INT, COL_STRING1, COL_STRING2, COL_BOOL, COL_MULTITEXTCHOICE); // Will keep track of state of the columns, that is are they filtered, sorted, or have no modifiers. private static Map defaultColumnState = new HashMap<>(); @@ -213,9 +208,8 @@ private void doSetup() throws IOException, CommandException new FieldDefinition(COL_STRING1, FieldDefinition.ColumnType.String), new FieldDefinition(COL_STRING2, FieldDefinition.ColumnType.String), new FieldDefinition(COL_BOOL, FieldDefinition.ColumnType.Boolean))); - if (MULTI_CHOICE_ENABLED) - fields.add(new FieldDefinition(COL_MULTITEXTCHOICE, FieldDefinition.ColumnType.MultiValueTextChoice) - .setMultiChoiceValues(TEXT_MULTI_CHOICE_LIST)); + fields.add(new FieldDefinition(COL_MULTITEXTCHOICE, FieldDefinition.ColumnType.MultiValueTextChoice) + .setMultiChoiceValues(TEXT_MULTI_CHOICE_LIST)); createSampleType(VIEW_DIALOG_ST, VIEW_DIALOG_ST_PREFIX, VIEW_DIALOG_ST_SIZE, fields); @@ -262,12 +256,9 @@ private void generateSamples(TestDataGenerator sampleSetDataGenerator, String sa rowData.put(COL_STRING1, stringSets.get(allPossibleIndex)); rowData.put(COL_STRING2, stringSetMembers.get(memIndex)); rowData.put(COL_BOOL, sampleId % 2 == 0); - if (MULTI_CHOICE_ENABLED) - { - rowData.put(COL_MULTITEXTCHOICE, sampleId % 5 == 0 - ? List.of() - : List.of(TEXT_MULTI_CHOICE_LIST.get(Math.abs(name.hashCode()) % TEXT_MULTI_CHOICE_LIST.size()))); - } + rowData.put(COL_MULTITEXTCHOICE, sampleId % 5 == 0 + ? List.of() + : List.of(TEXT_MULTI_CHOICE_LIST.get(Math.abs(name.hashCode()) % TEXT_MULTI_CHOICE_LIST.size()))); sampleSetDataGenerator.addCustomRow(rowData); allPossibleIndex++; @@ -817,9 +808,6 @@ private void testEditView(String testName, String viewName) throws Exception log(String.format("Remove the filter '%s' and validate grid is now in '%s' mode.", expectedFilter1Text, EDITED_ALERT)); grid.removeFilter(expectedFilter1Text); - // On MSSQL/Windows grid.getRows isn't always updated, pause just a moment to let the test code catch up. - sleep(500); - validateGridHeader(testName, grid, EDITED_ALERT, true); // Wait until grid.getRows().size() gets an updated count. @@ -1084,9 +1072,7 @@ public void testFieldInsertionOrder() throws Exception customizeModal.isAvailableFieldSelected(columnToAdd)); log("Validate that the order of the fields in the 'Shown in Grid' column are as expected."); - expectedFields = MULTI_CHOICE_ENABLED - ? List.of(COL_NAME, COL_STRING1, COL_STRING2, COL_INT, COL_BOOL, COL_MULTITEXTCHOICE) - : List.of(COL_NAME, COL_STRING1, COL_STRING2, COL_INT, COL_BOOL); + expectedFields = List.of(COL_NAME, COL_STRING1, COL_STRING2, COL_INT, COL_BOOL, COL_MULTITEXTCHOICE); checker().verifyEquals(String.format("After adding '%s' fields displayed in 'Show in Grid' panel not as expected.", columnToAdd), expectedFields, customizeModal.getSelectedFieldLabels()); @@ -1490,7 +1476,6 @@ public void testWarningOnInvalidDateFilter() throws Exception @Test public void testCustomGridViewsMVTCtoTC() throws Exception { - Assume.assumeTrue("Multi-choice text fields are only supported on PostgreSQL", MULTI_CHOICE_ENABLED); goToProjectHome(); resetFieldToMVTC(); resetDefaultView(DEFAULT_VIEW_SAMPLE_TYPE, DEFAULT_COLUMNS); @@ -1543,7 +1528,6 @@ public void testCustomGridViewsMVTCtoTC() throws Exception @Test public void testCustomGridViewsTCtoMVTC() throws Exception { - Assume.assumeTrue("Multi-choice text fields are only supported on PostgreSQL", MULTI_CHOICE_ENABLED); goToProjectHome(); resetFieldToMVTC(); resetDefaultView(DEFAULT_VIEW_SAMPLE_TYPE, DEFAULT_COLUMNS); @@ -1596,7 +1580,6 @@ public void testCustomGridViewsTCtoMVTC() throws Exception @Test public void testCustomGridViewsMVTCtoText() throws Exception { - Assume.assumeTrue("Multi-choice text fields are only supported on PostgreSQL", MULTI_CHOICE_ENABLED); goToProjectHome(); resetFieldToMVTC(); resetDefaultView(DEFAULT_VIEW_SAMPLE_TYPE, DEFAULT_COLUMNS); diff --git a/src/org/labkey/test/tests/elisa/ElisaMultiPlateAssayTest.java b/src/org/labkey/test/tests/elisa/ElisaMultiPlateAssayTest.java index bded4bbe8b..9f8f1c4287 100644 --- a/src/org/labkey/test/tests/elisa/ElisaMultiPlateAssayTest.java +++ b/src/org/labkey/test/tests/elisa/ElisaMultiPlateAssayTest.java @@ -59,9 +59,7 @@ public class ElisaMultiPlateAssayTest extends BaseWebDriverTest @Override protected void doCleanup(boolean afterTest) { - // Need an extra-long timeout for deleting project - // Issue 42163: Deleting experiment properties is slow on SQL server - _containerHelper.deleteProject(getProjectName(), afterTest, 6 * 60_000); + _containerHelper.deleteProject(getProjectName(), afterTest); } @BeforeClass diff --git a/src/org/labkey/test/tests/list/ListDateAndTimeTest.java b/src/org/labkey/test/tests/list/ListDateAndTimeTest.java index efe0fdb3b5..944cfabdee 100644 --- a/src/org/labkey/test/tests/list/ListDateAndTimeTest.java +++ b/src/org/labkey/test/tests/list/ListDateAndTimeTest.java @@ -27,7 +27,6 @@ import org.labkey.test.BaseWebDriverTest; import org.labkey.test.SortDirection; import org.labkey.test.TestFileUtils; -import org.labkey.test.WebTestHelper; import org.labkey.test.categories.Daily; import org.labkey.test.categories.Data; import org.labkey.test.categories.Hosting; @@ -609,12 +608,6 @@ else if (date.equals(dateUseTimeOnly)) log("Sort the date-only field in ascending order."); List expectedKeyColOrder = new ArrayList<>(); - // In MSSQL the "empty" value is at the top. - if (WebTestHelper.getDatabaseType() == WebTestHelper.DatabaseType.MicrosoftSQLServer) - { - expectedKeyColOrder.add("11"); // (empty) 14:59:25 - } - expectedKeyColOrder.add("1"); // 1950-10-12 08:00:01 expectedKeyColOrder.add("10"); // 1989-08-12 (empty) expectedKeyColOrder.add("4"); // 1992-03-03 10:10:10 @@ -625,12 +618,7 @@ else if (date.equals(dateUseTimeOnly)) expectedKeyColOrder.add("3"); // 2024-01-01 00:00:00 expectedKeyColOrder.add("8"); // 2024-02-29 18:32:00 expectedKeyColOrder.add("2"); // (some future date) 14:23:54 - - // In postgres the "empty" value is at the bottom. - if (WebTestHelper.getDatabaseType() == WebTestHelper.DatabaseType.PostgreSQL) - { - expectedKeyColOrder.add("11"); // (empty) 14:59:25 - } + expectedKeyColOrder.add("11"); // (empty) 14:59:25 table.setSort(dateCol, SortDirection.ASC); List actualKeyColOrder = table.getColumnDataAsText(keyCol); @@ -642,12 +630,7 @@ else if (date.equals(dateUseTimeOnly)) log("Sort the date-only field in descending order."); expectedKeyColOrder = new ArrayList<>(); - // Empty is sorted differently between postgres and MSSQL. - if (WebTestHelper.getDatabaseType() == WebTestHelper.DatabaseType.PostgreSQL) - { - expectedKeyColOrder.add("11"); // (empty) 14:59:25 - } - + expectedKeyColOrder.add("11"); // (empty) 14:59:25 expectedKeyColOrder.add("2"); expectedKeyColOrder.add("8"); expectedKeyColOrder.add("3"); @@ -659,11 +642,6 @@ else if (date.equals(dateUseTimeOnly)) expectedKeyColOrder.add("10"); expectedKeyColOrder.add("1"); - if (WebTestHelper.getDatabaseType() == WebTestHelper.DatabaseType.MicrosoftSQLServer) - { - expectedKeyColOrder.add("11"); // (empty) 14:59:25 - } - table.setSort(dateCol, SortDirection.DESC); actualKeyColOrder = table.getColumnDataAsText(keyCol); @@ -677,11 +655,6 @@ else if (date.equals(dateUseTimeOnly)) log("Sort the time-only field in ascending order."); expectedKeyColOrder = new ArrayList<>(); - if (WebTestHelper.getDatabaseType() == WebTestHelper.DatabaseType.MicrosoftSQLServer) - { - expectedKeyColOrder.add("10"); // 1989-08-12 (empty) - } - expectedKeyColOrder.add("3"); // 2024-01-01 00:00:00 expectedKeyColOrder.add("1"); // 1950-10-12 08:00:01 expectedKeyColOrder.add("7"); // 1995-03-03 09:10:10 @@ -692,11 +665,7 @@ else if (date.equals(dateUseTimeOnly)) expectedKeyColOrder.add("11"); // (empty) 14:59:25 expectedKeyColOrder.add("9"); // 2002-09-15 17:45:20 expectedKeyColOrder.add("8"); // 2024-02-29 18:32:00 - - if (WebTestHelper.getDatabaseType() == WebTestHelper.DatabaseType.PostgreSQL) - { - expectedKeyColOrder.add("10"); // 1989-08-12 (empty) - } + expectedKeyColOrder.add("10"); // 1989-08-12 (empty) table.setSort(timeCol, SortDirection.ASC); actualKeyColOrder = table.getColumnDataAsText(keyCol); @@ -708,11 +677,7 @@ else if (date.equals(dateUseTimeOnly)) log("Sort the time-only field in descending order."); expectedKeyColOrder = new ArrayList<>(); - if (WebTestHelper.getDatabaseType() == WebTestHelper.DatabaseType.PostgreSQL) - { - expectedKeyColOrder.add("10"); // 1989-08-12 (empty) - } - + expectedKeyColOrder.add("10"); // 1989-08-12 (empty) expectedKeyColOrder.add("8"); expectedKeyColOrder.add("9"); expectedKeyColOrder.add("11"); @@ -724,11 +689,6 @@ else if (date.equals(dateUseTimeOnly)) expectedKeyColOrder.add("1"); expectedKeyColOrder.add("3"); - if (WebTestHelper.getDatabaseType() == WebTestHelper.DatabaseType.MicrosoftSQLServer) - { - expectedKeyColOrder.add("10"); // 1989-08-12 (empty) - } - table.setSort(timeCol, SortDirection.DESC); actualKeyColOrder = table.getColumnDataAsText(keyCol); diff --git a/src/org/labkey/test/tests/list/ListTest.java b/src/org/labkey/test/tests/list/ListTest.java index 6d87576849..b45875bd39 100644 --- a/src/org/labkey/test/tests/list/ListTest.java +++ b/src/org/labkey/test/tests/list/ListTest.java @@ -18,7 +18,6 @@ import org.hamcrest.CoreMatchers; import org.hamcrest.MatcherAssert; -import org.junit.Assume; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; @@ -109,7 +108,6 @@ public class ListTest extends BaseWebDriverTest protected final static String LIST_NAME_HTML_KEY = "A_HtmlKey_" + DOMAIN_TRICKY_CHARACTERS; protected final static ColumnType LIST_KEY_TYPE = ColumnType.String; protected final static String LIST_KEY_NAME = "Key"; - boolean IS_POSTGRES = WebTestHelper.getDatabaseType() == WebTestHelper.DatabaseType.PostgreSQL; protected final static String LIST_KEY_NAME2 = "Color \"`~!@#$%^&*()_-+={}[]|\\:;<>,.?/"; protected final static String LIST_KEY_NAME2_BULK = "\"Color \"\"`~!@#$%^&*()_-+={}[]|\\:;<>,.?/\""; @@ -637,15 +635,7 @@ public void testCustomViews() log("Check Customize View worked"); assertTextPresent(TEST_DATA[TD_COLOR][3]); - // Sorting is different between MSSQL and postgres if one of the values is empty / blank. - if (WebTestHelper.getDatabaseType() == WebTestHelper.DatabaseType.MicrosoftSQLServer) - { - assertTextPresentInThisOrder(TEST_DATA[TD_COLOR][3], TEST_DATA[TD_COLOR][1], TEST_DATA[TD_COLOR][2]); - } - else - { - assertTextPresentInThisOrder(TEST_DATA[TD_COLOR][1], TEST_DATA[TD_COLOR][2], TEST_DATA[TD_COLOR][3]); - } + assertTextPresentInThisOrder(TEST_DATA[TD_COLOR][1], TEST_DATA[TD_COLOR][2], TEST_DATA[TD_COLOR][3]); assertTextNotPresent(TEST_DATA[TD_COLOR][0], _listColGood.getLabel()); @@ -665,14 +655,7 @@ public void testCustomViews() File tableFile = new DataRegionExportHelper(new DataRegionTable("query", getDriver())).exportText(); TextSearcher tsvSearcher = new TextSearcher(tableFile); - if (WebTestHelper.getDatabaseType() == WebTestHelper.DatabaseType.MicrosoftSQLServer) - { - assertTextPresentInThisOrder(tsvSearcher, TEST_DATA[TD_COLOR][3], TEST_DATA[TD_COLOR][1], TEST_DATA[TD_COLOR][2]); - } - else - { - assertTextPresentInThisOrder(tsvSearcher, TEST_DATA[TD_COLOR][1], TEST_DATA[TD_COLOR][2], TEST_DATA[TD_COLOR][3]); - } + assertTextPresentInThisOrder(tsvSearcher, TEST_DATA[TD_COLOR][1], TEST_DATA[TD_COLOR][2], TEST_DATA[TD_COLOR][3]); assertTextNotPresent(tsvSearcher, TEST_DATA[TD_COLOR][0], _listColGood.getLabel()); filterTest(); @@ -1779,7 +1762,6 @@ public void testFieldUniqueConstraint() listDefinitionPage.clickSave(); String expectedDataChanges = "Indices: [field name1, unique: true, fieldname@3, unique: false, fieldname_2, unique: true] > [FieldName@3, unique: true, fieldName_2, unique: false]"; - if (!IS_POSTGRES) expectedDataChanges = "Indices: [FieldName@3, unique: false, field Name1, unique: true, fieldName_2, unique: true] > [FieldName@3, unique: true, fieldName_2, unique: false]"; expectedDomainEvent = new AuditLogHelper.DetailedAuditEventRow(null, listName, null, "The descriptor of domain " + listName + " was updated.", "", null, null, expectedDataChanges); @@ -1838,7 +1820,6 @@ public void testAutoIncrementKeyEncoded() @Test public void testMultiChoiceValues() throws IOException, CommandException { - Assume.assumeTrue("Multi-choice text fields are only supported on PostgreSQL", WebTestHelper.getDatabaseType() == WebTestHelper.DatabaseType.PostgreSQL); // Setup a list with an auto-increment key and a multi-value text choice field. String encodedListName = TestDataGenerator.randomDomainName("multiChoiceList", DomainUtils.DomainKind.IntList); String keyName = TestDataGenerator.randomFieldName("'>'"); @@ -1996,10 +1977,8 @@ private void verifyTableIndices(String prefix, List indexSuffixes) private void verifyTableIndexNonUnique(String prefix, String suffix, boolean isUnique) { - String boolDisplay = isUnique ? "0" : "1"; - if (IS_POSTGRES) boolDisplay = isUnique ? "false" : "true"; - String fieldKey = prefix + suffix; - if (IS_POSTGRES) fieldKey = fieldKey.toLowerCase(); + String boolDisplay = isUnique ? "false" : "true"; + String fieldKey = (prefix + suffix).toLowerCase(); Locator locator = Locator.xpath("//td[contains(text(), '" + fieldKey + "')]/preceding-sibling::td[2][text()='" + boolDisplay + "']"); checker().verifyTrue("Non_Unique value not as expected in metadata for locator: " + locator, locator.existsIn(getDriver())); } diff --git a/src/org/labkey/test/tests/microarray/BaseExpressionMatrixTest.java b/src/org/labkey/test/tests/microarray/BaseExpressionMatrixTest.java index 0260549b31..9e48fca722 100644 --- a/src/org/labkey/test/tests/microarray/BaseExpressionMatrixTest.java +++ b/src/org/labkey/test/tests/microarray/BaseExpressionMatrixTest.java @@ -24,7 +24,6 @@ import org.labkey.test.util.LogMethod; import org.labkey.test.util.LoggedParam; import org.labkey.test.util.PortalHelper; -import org.labkey.test.util.PostgresOnlyTest; import org.labkey.test.util.RReportHelper; import java.io.File; @@ -33,7 +32,7 @@ import java.util.List; import java.util.Map; -public class BaseExpressionMatrixTest extends BaseWebDriverTest implements PostgresOnlyTest +public class BaseExpressionMatrixTest extends BaseWebDriverTest { protected static final String PIPELINE_NAME = "create-matrix"; protected static final String ASSAY_NAME = "Test Expression Matrix"; diff --git a/src/org/labkey/test/tests/nab/NabAssayTest.java b/src/org/labkey/test/tests/nab/NabAssayTest.java index 6327f45b5d..7d3e874527 100644 --- a/src/org/labkey/test/tests/nab/NabAssayTest.java +++ b/src/org/labkey/test/tests/nab/NabAssayTest.java @@ -330,8 +330,6 @@ public void runUITests() build()).doImport(); assertElementPresent(Locators.labkeyError.containing(getConversionErrorMessage("bad-date", "Date", Date.class)), 1); -// These dates are SQL Server specific -// assertElementPresent(Locators.labkeyError.containing("Only dates between January 1, 1753 and December 31, 9999 are accepted."), 1); assertElementPresent(Locators.labkeyError.containing("Only dates between "), 1); clickButton("Cancel"); @@ -470,7 +468,7 @@ public void runUITests() region.clickHeaderButtonAndWait("Link to Study"); selectOptionByText(AssayConstants.TARGET_STUDY_FIELD_LOCATOR, "/" + TEST_ASSAY_PRJ_NAB + "/" + TEST_ASSAY_FLDR_STUDY1 + " (" + TEST_ASSAY_FLDR_STUDY1 + " Study)"); - clickButton("Next", 300_000); // Triggers a query that is, sometimes, very slow on SQL Server + clickButton("Next"); region = new DataRegionTable("Data", this); region.clickHeaderButtonAndWait("Link to Study"); diff --git a/src/org/labkey/test/tests/viability/AbstractViabilityTest.java b/src/org/labkey/test/tests/viability/AbstractViabilityTest.java index fe71fee227..ec38a5f0b4 100644 --- a/src/org/labkey/test/tests/viability/AbstractViabilityTest.java +++ b/src/org/labkey/test/tests/viability/AbstractViabilityTest.java @@ -25,7 +25,6 @@ import org.labkey.test.params.FieldDefinition; import org.labkey.test.tests.AbstractAssayTest; import org.labkey.test.util.PortalHelper; -import org.labkey.test.util.PostgresOnlyTest; import org.labkey.test.util.QCAssayScriptHelper; import org.openqa.selenium.WebDriverException; @@ -35,7 +34,7 @@ import static org.junit.Assert.assertTrue; -public abstract class AbstractViabilityTest extends AbstractAssayTest implements PostgresOnlyTest +public abstract class AbstractViabilityTest extends AbstractAssayTest { @Override public List getAssociatedModules() diff --git a/src/org/labkey/test/tests/visualization/BarPlotTest.java b/src/org/labkey/test/tests/visualization/BarPlotTest.java index c045d79302..196b9847a9 100644 --- a/src/org/labkey/test/tests/visualization/BarPlotTest.java +++ b/src/org/labkey/test/tests/visualization/BarPlotTest.java @@ -19,7 +19,6 @@ import org.junit.experimental.categories.Category; import org.labkey.test.BaseWebDriverTest; import org.labkey.test.Locator; -import org.labkey.test.TestTimeoutException; import org.labkey.test.categories.Charting; import org.labkey.test.categories.Daily; import org.labkey.test.categories.Hosting; @@ -297,15 +296,7 @@ private void doColumnPlotClickThrough() goToProjectHome(); clickFolder(getFolderName()); clickTab("Clinical and Assay Data"); - try - { - waitAndClickAndWait(Locator.linkWithText(DATA_SOURCE_1)); - } - catch(TestTimeoutException e) - { - //click again, workaround for sqlserver failure. - clickAndWait(Locator.linkWithText(DATA_SOURCE_1)); - } + waitAndClickAndWait(Locator.linkWithText(DATA_SOURCE_1)); dataRegionTable = new DataRegionTable("Dataset", getDriver()); log("Create a bar plot.");