Skip to content

Commit e2e8a97

Browse files
committed
Update test descriptions
1 parent 90c1756 commit e2e8a97

File tree

155 files changed

+169
-1173
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

155 files changed

+169
-1173
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@
3838
},
3939
"scripts": {
4040
"test": "mocha --opts test/opts/mocha.opts",
41-
"posttest": "node test/opts/versions.js",
42-
"testwindows": "mocha --opts test\\opts\\mocha.opts && npm run posttest"
41+
"posttest": "node examples/version.js"
4342
},
4443
"engines": {
4544
"node": ">=4"

package/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@
3636
"scripts": {
3737
"install": "node package/oracledbinstall.js",
3838
"test": "mocha --opts test/opts/mocha.opts",
39-
"posttest": "node test/opts/versions.js",
40-
"testwindows": "mocha --opts test\\opts\\mocha.opts && npm run posttest"
39+
"posttest": "node examples/version.js"
4140
},
4241
"engines": {
4342
"node": ">=4"

test/README.md

Lines changed: 19 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Test node-oracledb
22

3-
*Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.*
3+
*Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.*
44

55
You may not use the identified files except in compliance with the Apache
66
License, Version 2.0 (the "License.")
@@ -19,7 +19,7 @@ The node-oracledb test suite uses 'mocha', 'should' and 'async'. See
1919
[LICENSE](https://github.com/oracle/node-oracledb/blob/master/LICENSE.md)
2020
for relevant licenses.
2121

22-
## 1. Preparations for running tests
22+
## 1. Preparations
2323

2424
See [INSTALL](https://github.com/oracle/node-oracledb/blob/master/INSTALL.md)
2525
for installation requirements and more details.
@@ -36,7 +36,7 @@ mkdir <some-directory>
3636
cd <some-directory>
3737
```
3838

39-
### 1.2 Get node-oracledb from GitHub
39+
### 1.2 Clone node-oracledb from GitHub
4040

4141
Clone the project repository:
4242

@@ -85,13 +85,8 @@ and the authentication service have been appropriately configured. See
8585
for more details. And then, set the environment variable `NODE_ORACLEDB_EXTERNALAUTH`
8686
to be `true`.
8787

88-
Note: the test suite requires a schema with these privileges:
89-
90-
- CREATE TABLE
91-
- CREATE SESSION
92-
- CREATE PROCEDURE
93-
- CREATE SEQUENCE
94-
- CREATE TRIGGER
88+
Note: the test suite requires a schema with privileges CREATE TABLE, CREATE SESSION,
89+
CREATE PROCEDURE, CREATE SEQUENCE, CREATE TRIGGER.
9590

9691
### 1.5 Set NODE_PATH
9792

@@ -103,32 +98,16 @@ export NODE_PATH=<some-directory>/node-oracledb/lib
10398

10499
### 2.1 Run the complete test suite
105100

106-
#### 2.1.1 On Unix-like systems
107-
108101
```
109-
cd <some-directory>/node-oracledb
102+
cd node-oracledb
110103
npm test
111104
```
112105

113-
This calls the `test` script defined in `oracledb/package.json`.
114-
115-
#### 2.1.2 On Windows
116-
117-
```
118-
cd <some-directory>/node_oracledb
119-
npm run testwindows
120-
```
121-
122-
This calls the `testwindows` script defined in `oracledb/package.json`.
123-
124-
See [npm scripts](https://docs.npmjs.com/misc/scripts) for more information
125-
about how npm handles the "scripts" field of `package.json`.
126-
127106
### 2.2 Run specified test(s)
128107

129108
```
130-
cd <some-directory>/node_oracledb
131-
<mocha-executable-file-directory>/mocha test/<test-names>
109+
cd node_oracledb
110+
./node_modules/.bin/mocha test/<test-names>
132111
```
133112

134113
See [mochajs.org](http://mochajs.org/) for more information on running tests with mocha.
@@ -139,41 +118,28 @@ See [CONTRIBUTING](https://github.com/oracle/node-oracledb/blob/master/CONTRIBUT
139118
for general information on contribution requirements.
140119

141120
For easy correlation between results and test code, each test is
142-
assigned a number. The following number ranges have been chosen:
143-
144-
- 1 - 20 are reserved for basic functional tests
145-
- 21 - 50 are reserved for data type supporting tests
146-
- 51 onwards are for other tests
121+
assigned a number. The [Test List](https://github.com/oracle/node-oracledb/blob/master/test/list.txt)
122+
shows the numbering of tests.
147123

148124
In order to include your tests in the suite, add each new test file
149125
name to [`test/opts/mocha.opts`](https://github.com/oracle/node-oracledb/blob/master/test/opts/mocha.opts).
150126

151-
Please also add a description of each individual test to the Test
152-
List.
153-
154-
## 4. Test List
155-
156-
See [`test/list.txt`](https://github.com/oracle/node-oracledb/blob/master/test/list.txt)
157-
for the list of existing tests.
158-
159-
## 5. Tests Compatibility
160-
161-
- We conduct base testing with Instant Client 11.2.0.4 and 12.1.0.2 on Linux X64
162-
and Windows 7.
127+
## 4. Compatibility
163128

164-
- Users of 11.2.0.1 and 11.2.0.2 clients may see failures with poolTimeout.js
165-
and dataTypeDouble.js.
129+
We basically test with the following environment options:
166130

167-
- Slow networks may cause some tests to timeout.
131+
- Oracle Instant Clients: 11.2.0.4, 12.1.0.2, 12.2.0.1
132+
- Operating Systems (X64): macOS, Linux, Windows
133+
- Node.js LTS versions
168134

169-
## 6. Troubleshooting
135+
## 5. Troubleshooting
170136

171137
You may encounter some troubles when running the test suite. These troubles
172138
might be caused by the concurrency issue of Mocha framework, network latencies,
173139
or database server issues. This section gives some issues that we ever saw
174140
and our solutions.
175141

176-
### 6.1 ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired
142+
### 5.1 ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired
177143

178144
This error occurs when Node.js programs try to change database objects which
179145
hold locks. The workaround would be:
@@ -183,7 +149,7 @@ test files.
183149
(2) Try not to use 'beforeEach' blocks for object operations to avoid
184150
the interference between cases.
185151

186-
### 6.2 ORA-00018: maximum number of sessions exceeded
152+
### 5.2 ORA-00018: maximum number of sessions exceeded
187153

188154
This error occurs when the test suite takes up more sessions than the
189155
configured limit. You can alter the session limit on the database server side.
@@ -200,7 +166,7 @@ do
200166
done
201167
```
202168

203-
### 6.3 ORA-28865: SSL connection closed
169+
### 5.3 ORA-28865: SSL connection closed
204170

205171
You may encounter this error when the test suite sends more connection
206172
requests per second than the database is configured to handle.

test/autoCommit.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. */
1+
/* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. */
22

33
/******************************************************************************
44
*
@@ -24,12 +24,6 @@
2424
* DESCRIPTION
2525
* Testing general autoCommit feature.
2626
*
27-
* NUMBERING RULE
28-
* Test numbers follow this numbering rule:
29-
* 1 - 20 are reserved for basic functional tests
30-
* 21 - 50 are reserved for data type supporting tests
31-
* 51 onwards are for other tests
32-
*
3327
*****************************************************************************/
3428
'use strict';
3529

test/autoCommit4nestedExecutes.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. */
1+
/* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. */
22

33
/******************************************************************************
44
*
@@ -29,12 +29,6 @@
2929
*
3030
* https://github.com/oracle/node-oracledb/issues/269
3131
*
32-
* NUMBERING RULE
33-
* Test numbers follow this numbering rule:
34-
* 1 - 20 are reserved for basic functional tests
35-
* 21 - 50 are reserved for data type supporting tests
36-
* 51 onwards are for other tests
37-
*
3832
*****************************************************************************/
3933
'use strict';
4034

test/autoCommitForSelect.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. */
1+
/* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. */
22

33
/******************************************************************************
44
*
@@ -24,12 +24,6 @@
2424
* DESCRIPTION
2525
* Testing autoCommit feature for SELECTs feature.
2626
*
27-
* NUMBERING RULE
28-
* Test numbers follow this numbering rule:
29-
* 1 - 20 are reserved for basic functional tests
30-
* 21 - 50 are reserved for data type supporting tests
31-
* 51 onwards are for other tests
32-
*
3327
*****************************************************************************/
3428
'use strict';
3529

test/bindTimestamp.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. */
1+
/* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. */
22

33
/******************************************************************************
44
*
@@ -24,12 +24,6 @@
2424
* DESCRIPTION
2525
* Testing DML and PL/SQL binding of TIMESTAMP types.
2626
*
27-
* NUMBERING RULE
28-
* Test numbers follow this numbering rule:
29-
* 1 - 20 are reserved for basic functional tests
30-
* 21 - 50 are reserved for data type supporting tests
31-
* 51 onwards are for other tests
32-
*
3327
*****************************************************************************/
3428
'use strict';
3529

test/binding.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. */
1+
/* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. */
22

33
/******************************************************************************
44
*
@@ -26,12 +26,6 @@
2626
* The cases uses PL/SQL to test in-bind, out-bind and in-out-bind.
2727
* The cases take bind value in OBJECT and ARRAY formats.
2828
*
29-
* NUMBERING RULE
30-
* Test numbers follow this numbering rule:
31-
* 1 - 20 are reserved for basic functional tests
32-
* 21 - 50 are reserved for data type supporting tests
33-
* 51 onwards are for other tests
34-
*
3529
*****************************************************************************/
3630
'use strict';
3731

test/binding_DMLInsert.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. */
1+
/* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. */
22

33
/******************************************************************************
44
*
@@ -26,12 +26,6 @@
2626
* Test cases insert oracledb type STRING/BUFFER to all db column types
2727
* The cases take small/null/large bind values.
2828
*
29-
* NUMBERING RULE
30-
* Test numbers follow this numbering rule:
31-
* 1 - 20 are reserved for basic functional tests
32-
* 21 - 50 are reserved for data type supporting tests
33-
* 51 onwards are for other tests
34-
*
3529
*****************************************************************************/
3630
'use strict';
3731

test/binding_DMLReturningInto.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. */
1+
/* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. */
22

33
/******************************************************************************
44
*
@@ -26,12 +26,6 @@
2626
* Test cases test returning into oracledb type STRING/BUFFER
2727
* The cases take small/null bind values.
2828
*
29-
* NUMBERING RULE
30-
* Test numbers follow this numbering rule:
31-
* 1 - 20 are reserved for basic functional tests
32-
* 21 - 50 are reserved for data type supporting tests
33-
* 51 onwards are for other tests
34-
*
3529
*****************************************************************************/
3630
'use strict';
3731

0 commit comments

Comments
 (0)