Skip to content

Commit 4e7263a

Browse files
committed
put restart test in its own container & run tests in parallel
1 parent 103290b commit 4e7263a

1 file changed

Lines changed: 17 additions & 16 deletions

File tree

packages/modules/oraclefree/src/oraclefree-container.test.ts

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { OracleDbContainer, StartedOracleDbContainer } from "./oraclefree-contai
44

55
const IMAGE = getImage(__dirname);
66

7-
describe.sequential("OracleFreeContainer", { timeout: 240_000 }, () => {
7+
describe("OracleFreeContainer", { timeout: 240_000 }, () => {
88
describe("default configuration", () => {
99
let container: StartedOracleDbContainer;
1010

@@ -43,21 +43,6 @@ describe.sequential("OracleFreeContainer", { timeout: 240_000 }, () => {
4343
await connection.close();
4444
});
4545

46-
it("should work with restarted container", async () => {
47-
await container.restart();
48-
49-
const connection = await oracledb.getConnection({
50-
user: container.getUsername(),
51-
password: container.getPassword(),
52-
connectString: container.getUrl(),
53-
});
54-
55-
const result = await connection.execute("SELECT 1 FROM DUAL");
56-
expect(result.rows![0]).toEqual([1]);
57-
58-
await connection.close();
59-
});
60-
6146
it("should have default database name", async () => {
6247
const connection = await oracledb.getConnection({
6348
user: container.getUsername(),
@@ -105,4 +90,20 @@ describe.sequential("OracleFreeContainer", { timeout: 240_000 }, () => {
10590
await connection.close();
10691
// }
10792
});
93+
94+
it("should work with restarted container", async () => {
95+
const container = await new OracleDbContainer(IMAGE).start();
96+
await container.restart();
97+
98+
const connection = await oracledb.getConnection({
99+
user: container.getUsername(),
100+
password: container.getPassword(),
101+
connectString: container.getUrl(),
102+
});
103+
104+
const result = await connection.execute("SELECT 1 FROM DUAL");
105+
expect(result.rows![0]).toEqual([1]);
106+
107+
await connection.close();
108+
});
108109
});

0 commit comments

Comments
 (0)