Skip to content

Commit e0683e3

Browse files
authored
Merge pull request #357 from Achal1607/increase-integration-test-timeouts
Increased integration tests timeouts
2 parents 4aef0b6 + bd466ad commit e0683e3

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

vscode/src/test/integration/suite/general/explorer.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ suite('Explorer Test Suite', () => {
3535
const lvp = await myExplorer.createViewProvider(await awaitClient(), 'foundProjects');
3636
const firstLevelChildren = await (lvp.getChildren() as Thenable<any[]>);
3737
assert.strictEqual(firstLevelChildren.length, 0, "No child under the root");
38-
}).timeout(10000);
38+
}).timeout(60000);
3939
});

vscode/src/test/integration/suite/general/extension.test.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ suite('Extension Test Suite', function () {
4040
// Create project which used be used for testing
4141
this.beforeAll(async () => {
4242
await prepareProject(filePaths);
43-
}).timeout(10000);
43+
}).timeout(60000);
4444

4545
// This test must be run first, in order to activate the extension and wait for the activation to complete
4646
test("Extension loaded and activated", async () => {
@@ -59,7 +59,7 @@ suite('Extension Test Suite', function () {
5959
}
6060
assert.ok(cannotReassignVersion, "Cannot reassign value of version");
6161

62-
}).timeout(10000);
62+
}).timeout(60000);
6363

6464
// Test if clusters are loaded or not
6565
test('Find clusters', async () => {
@@ -93,7 +93,7 @@ suite('Extension Test Suite', function () {
9393
for (let c of found) {
9494
assert.ok(c.startsWith(nbcode.extensionPath), `All extensions are below ${nbcode.extensionPath}, but: ${c}`);
9595
}
96-
}).timeout(10000);
96+
}).timeout(60000);
9797

9898
// Check if Jdk commands have been loaded
9999
test("Jdk commands loaded", async () => {
@@ -107,7 +107,7 @@ suite('Extension Test Suite', function () {
107107
}
108108

109109
assert.ok(containsJdkCommands, "No Jdk command has been loaded");
110-
}).timeout(10000);
110+
}).timeout(60000);
111111

112112
// Check if format document command is executed successfully
113113
test("Format document", async () => {
@@ -118,7 +118,7 @@ suite('Extension Test Suite', function () {
118118
const unformattedCode = SAMPLE_CODE_FORMAT_DOCUMENT.split('\n').length;
119119
const isDocumentFormatted = formattedCode > unformattedCode;
120120
assert.ok(isDocumentFormatted, "document is not formatted");
121-
}).timeout(10000);
121+
}).timeout(60000);
122122

123123
// Check if imports are getting sorted on saving document
124124
test("Sort imports", async () => {
@@ -133,7 +133,7 @@ suite('Extension Test Suite', function () {
133133
savedCode.indexOf('import java.util.ArrayList;');
134134
assert.ok(isImportsSorted, "Imports are not sorted");
135135

136-
}).timeout(10000);
136+
}).timeout(60000);
137137

138138
// Check if unused imports are getting removed on saving document
139139
test("Remove unused imports", async () => {
@@ -148,7 +148,7 @@ suite('Extension Test Suite', function () {
148148
savedCode.indexOf('import java.lang.Integer;') === -1;
149149
assert.ok(areUnusedImportsRemoved, "Unused imports are not removed");
150150

151-
}).timeout(10000);
151+
}).timeout(60000);
152152

153153
// Check if refactor actions are getting showing on UI and if they are working
154154
test("Refactor actions executing", async () => {
@@ -176,7 +176,7 @@ suite('Extension Test Suite', function () {
176176
}
177177
}
178178
}
179-
}).timeout(10000);
179+
}).timeout(60000);
180180

181181
// Tests explorer is loading properly
182182
test("Test Explorer tests", async () => {
@@ -203,7 +203,7 @@ suite('Extension Test Suite', function () {
203203
dumpJava();
204204
throw error;
205205
}
206-
}).timeout(10000);
206+
}).timeout(60000);
207207

208208
// Check if compile workspace command is excuted succesfully
209209
test("Compile workspace", async () => {
@@ -221,7 +221,7 @@ suite('Extension Test Suite', function () {
221221
const item = await (lvp.getTreeItem(firstLevelChildren[0]) as Thenable<TreeItem>);
222222
assert.strictEqual(item?.label, "basicapp", "Element is named as the Maven project");
223223
});
224-
}).timeout(10000);
224+
}).timeout(60000);
225225

226226
// Get Project info
227227
test("Get project sources, classpath, and packages", async () => {
@@ -286,7 +286,7 @@ suite('Extension Test Suite', function () {
286286
dumpJava();
287287
throw error;
288288
}
289-
}).timeout(10000);
289+
}).timeout(60000);
290290

291291
// Check if clean workspace command is excuted succesfully
292292
test("Clean workspace", async () => {
@@ -296,7 +296,7 @@ suite('Extension Test Suite', function () {
296296

297297
const mainClass = path.join(folder, 'target');
298298
assert.ok(!fs.existsSync(mainClass), "Class created by compilation: " + mainClass);
299-
}).timeout(10000);
299+
}).timeout(60000);
300300

301301
// Check if xml document formatting is executed successfully
302302
test("XML Format document", async () => {
@@ -305,6 +305,6 @@ suite('Extension Test Suite', function () {
305305

306306
const formattedContents = editor.document.getText().trim();
307307
assert.ok(formattedContents == FORMATTED_POM_XML.trim(), "pom.xml is not formatted");
308-
}).timeout(10000);
308+
}).timeout(60000);
309309

310310
});

vscode/src/test/integration/suite/gradle/extension.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ suite("Extension gradle tests", function () {
5858
dumpJava();
5959
throw error;
6060
}
61-
}).timeout(50000);
61+
}).timeout(120*1000);
6262

6363
// Check if clean workspace command is excuted succesfully
6464
test("Clean workspace - Gradle", async () => {
@@ -71,5 +71,5 @@ suite("Extension gradle tests", function () {
7171
!fs.existsSync(mainClass),
7272
"Class created by compilation: " + mainClass
7373
);
74-
}).timeout(10000);
74+
}).timeout(60000);
7575
});

vscode/src/test/integration/suite/localisation/extension.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ suite("Extension localisation tests", function () {
4545
assert.ok(matchKeys(enBundlePath, langBundlePath), `Keys of ${DEFAULT_BUNDLE_FILE_NAME} and bundle.l10n.${lang}.json don't match`);
4646
assert.ok(matchValuesTemplate(enBundlePath, langBundlePath), `Value templates don't match for of the keys of ${DEFAULT_BUNDLE_FILE_NAME} and bundle.l10n.${lang}.json `);
4747
}
48-
}).timeout(10000);
48+
}).timeout(60000);
4949

5050
test("Consistency of keys across package.nls.lang.json files for supported languages", async () => {
5151
const extension = extensions.getExtension(EXTENSION_NAME);
@@ -57,7 +57,7 @@ suite("Extension localisation tests", function () {
5757
assert.ok(fs.existsSync(langPackagePath), `package.nls.${lang}.json doesn't exists`);
5858
assert.ok(matchKeys(enPackagePath, langPackagePath), `Keys of ${DEFAULT_PACKAGE_FILE_NAME} and package.nls.${lang}.json don't match`);
5959
}
60-
}).timeout(10000);
60+
}).timeout(60000);
6161

6262
// Check localisable fields being appropriately localised for the contributes defined in package.json
6363
test("Localisable fields in package.json localised properly ", async () => {
@@ -74,7 +74,7 @@ suite("Extension localisation tests", function () {
7474
assert.ok(checkViewsLocalisation(contributes.views, validKeys), "Error some views is not localized");
7575
assert.ok(checkDebuggersLocalisation(contributes.debuggers, validKeys), "Error some debugger labels not localized");
7676
assert.ok(checkConfigurationLocalisation(contributes.configuration, validKeys), "Error some configuration labels not localized");
77-
}).timeout(10000);
77+
}).timeout(60000);
7878

7979

8080
// Check if l10n.value is called with a valid key and the placeholder map has all the keys as required in the string template
@@ -86,6 +86,6 @@ suite("Extension localisation tests", function () {
8686
assert(enBundlePath, `${DEFAULT_BUNDLE_FILE_NAME} not found`);
8787
const validKeyValues = JSON.parse(fs.readFileSync(enBundlePath, 'utf8'));
8888
assert(checkL10nUsageInFiles(path.join(extension.extensionPath, "out"), ignoredDirEntriesNames, validKeyValues) === 0, "Some files have invalid localisation keys used. Check the logs or error messages");
89-
}).timeout(10000);
89+
}).timeout(60000);
9090

9191
});

0 commit comments

Comments
 (0)