Skip to content

Commit

Permalink
fix: ensure that this changes applies just for Oracle Driver
Browse files Browse the repository at this point in the history
Closes: typeorm#5067
  • Loading branch information
Murat Gundes authored and imnotjames committed Sep 21, 2020
1 parent ccb9879 commit a3fe2ea
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions test/github-issues/5067/issue-5067.ts
Expand Up @@ -2,6 +2,7 @@ import "reflect-metadata";
import {expect} from "chai";
import {Connection} from "../../../src";
import {closeTestingConnections, createTestingConnections} from "../../utils/test-utils";
import {OracleDriver} from "../../../src/driver/oracle/OracleDriver";

describe.only("github issues > #5067 ORA-00972: identifier is too long", () => {
let connections: Connection[];
Expand All @@ -11,14 +12,17 @@ describe.only("github issues > #5067 ORA-00972: identifier is too long", () => {
after(() => closeTestingConnections(connections));

it("generated parameter name returns index instead of parameter name", () => Promise.all(connections.map(async connection => {
const paramName = "output_";
const parametersCount = 0;
const createdParameter = await connection.driver.createParameter(paramName, parametersCount);
if (connection.driver instanceof OracleDriver)
{
const paramName = "output_";
const parametersCount = 0;
const createdParameter = await connection.driver.createParameter(paramName, parametersCount);

expect(createdParameter).to.be.not.undefined;
expect(createdParameter).to.be.not.null;
expect(createdParameter).to.be.an("String");
expect(createdParameter).to.not.match(/(?:output_)/);
expect(await connection.driver.createParameter(paramName, 2)).to.equal(":" + 3);
expect(createdParameter).to.be.not.undefined;
expect(createdParameter).to.be.not.null;
expect(createdParameter).to.be.an("String");
expect(createdParameter).to.not.match(/(?:output_)/);
expect(await connection.driver.createParameter(paramName, 2)).to.equal(":" + 3);
}
})));
});

0 comments on commit a3fe2ea

Please sign in to comment.