Skip to content

Commit a9efb63

Browse files
committed
Increase test timeouts
Closes #379 Signed-off-by: David Thompson <davthomp@redhat.com>
1 parent 00a2f13 commit a9efb63

File tree

5 files changed

+54
-59
lines changed

5 files changed

+54
-59
lines changed

.github/workflows/tests.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ jobs:
55
runs-on: ${{ matrix.os }}
66
strategy:
77
matrix:
8-
os: [ubuntu-latest]
8+
os: [ubuntu-latest, macos-latest]
99
include:
1010
- os: ubuntu-latest
1111
label: 'linux'
12+
- os: macos-latest
13+
label: 'darwin'
1214
steps:
1315
- name: Check out repository code
1416
uses: actions/checkout@v2

package-lock.json

Lines changed: 37 additions & 49 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@
291291
"tslint": "^5.20.1",
292292
"typescript": "^3.7.2",
293293
"typescript-tslint-plugin": "^0.3.1",
294-
"vscode-extension-tester": "^4.1.1",
294+
"vscode-extension-tester": "^4.1.2",
295295
"vscode-extension-tester-native": "^3.0.0",
296296
"vscode-test": "^1.2.3",
297297
"webpack": "^5.28.0",

src/test/vscodeUiTest/suite/projectGenerationTest.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ describe('Project generation tests', function() {
7474
* default values for the groupId, artifactId etc.
7575
*/
7676
it('should have correct default values when going through the wizard', async function() {
77-
this.timeout(30000);
77+
this.timeout(60000);
7878
const wizard: ProjectGenerationWizard = await ProjectGenerationWizard.openWizard(driver);
7979

8080
expect(await wizard.getNthQuickPickItemLabel(0), 'default should be Maven').equals('Maven');
@@ -122,7 +122,7 @@ describe('Project generation tests', function() {
122122
* step values at the wizard's title bar: (1/8), (2/8)
123123
*/
124124
it('should have correct step values', async function() {
125-
this.timeout(30000);
125+
this.timeout(60000);
126126
const wizard: ProjectGenerationWizard = await ProjectGenerationWizard.openWizard(driver);
127127
expect(await wizard.getInputBoxTitle()).to.have.string('1/8');
128128
expect(await wizard.getBackButton()).to.not.be.ok;
@@ -186,7 +186,7 @@ describe('Project generation tests', function() {
186186
* Quarkus Maven project with some extensions added
187187
*/
188188
it('should generate Maven project with extensions added', async function() {
189-
this.timeout(80000);
189+
this.timeout(360000);
190190

191191
const projectDestDir: string = path.join(tempDir, 'maven');
192192
const projectFolderName: string = 'quarkus-maven';
@@ -224,7 +224,7 @@ describe('Project generation tests', function() {
224224
* Quarkus Gradle project with some extensions added
225225
*/
226226
it('should generate Gradle project with extensions added', async function() {
227-
this.timeout(80000);
227+
this.timeout(480000);
228228

229229
const projectDestDir: string = path.join(tempDir, 'gradle');
230230
const projectFolderName: string = 'quarkus-gradle';
@@ -262,7 +262,7 @@ describe('Project generation tests', function() {
262262
* the previously generated project's values
263263
*/
264264
it('should display input values from previously generated project (with extensions)', async function() {
265-
this.timeout(80000);
265+
this.timeout(360000);
266266

267267
const projectDestDir: string = path.join(tempDir, 'previous-values-extensions');
268268

src/utils/codeQuarkusApiUtils.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,15 @@ async function httpsGet(url: string): Promise<string> {
9090
.then(resolve, reject);
9191
} else if (res.statusCode !== 200) {
9292
reject(`${res.statusCode}: ${res.statusMessage}`);
93+
} else {
94+
let data = '';
95+
res.on('data', (chunk: Buffer) => {
96+
data += chunk.toString('utf8');
97+
});
98+
res.on('end', () => {
99+
resolve(data);
100+
});
93101
}
94-
res.on('data', (d: Buffer) => {
95-
resolve(d.toString('utf8'));
96-
});
97102
})
98103
.on('error', reject);
99104
});

0 commit comments

Comments
 (0)