Skip to content

Commit fcf305b

Browse files
committed
Use Node and Python environment for smoke test CI
1 parent b79fa78 commit fcf305b

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

.circleci/config.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ jobs:
182182
183183
browser-compat-smoke-tests:
184184
docker:
185-
- image: cimg/node:16.1.0
185+
- image: cimg/python:3.9.4-node
186186
steps:
187187
- checkout
188188
- run:
@@ -299,10 +299,10 @@ workflows:
299299
- main
300300
- release
301301
- /^release-.*/
302-
- check-size:
303-
context: data-eng-gleanjs-gh
304-
requires:
305-
- hold
302+
# - check-size:
303+
# context: data-eng-gleanjs-gh
304+
# requires:
305+
# - hold
306306
- browser-compat-smoke-tests:
307307
context: data-eng-gleanjs-gh
308308
requires:

benchmarks/compat/tests/browserstack.test.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,14 @@ for (const browser of BROWSERS) {
6363

6464
await runWebTest(driver);
6565

66-
// Marking the test as passed for Browserstack.
66+
// Marking the test as passed for Browserstack
6767
await driver.executeScript(
6868
"browserstack_executor: {\"action\": \"setSessionStatus\", \"arguments\": {\"status\":\"passed\",\"reason\": \"Ping successfully sent!\"}}"
6969
);
7070
} catch(_) {
71+
// Make sure the process exits with an error code
72+
process.exitCode = 1;
73+
// Marking the test as failed for Browserstack
7174
await driver.executeScript(
7275
"browserstack_executor: {\"action\": \"setSessionStatus\", \"arguments\": {\"status\":\"failed\",\"reason\": \"Ping not sent :(\"}}"
7376
);

benchmarks/compat/tests/utils.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export class App {
4545
/**
4646
* Executes a smoke test for @mozilla/glean/web.
4747
*
48-
* This will execute the sample app in port 3000.
48+
* This assumes the app is being executed in port ${PORT}.
4949
*
5050
* @param {*} driver A selenium webdriver.
5151
*/
@@ -54,14 +54,14 @@ export async function runWebTest(driver) {
5454
// Loading the sample webpage will record a metric and submit a ping.
5555
// If the ping is submitted succesfully an element in the DOM with the id `msg`
5656
// will receive the text "Ping submitted succesfully."
57-
await driver.get(`http://localasdfhost:${PORT}/`);
57+
await driver.get(`http://localhost:${PORT}/`);
5858
// Give it time to send the ping request.
5959
const successTextContainer = await driver.findElement(By.id("msg"));
6060
await driver.wait(
6161
until.elementTextIs(
6262
successTextContainer,
6363
"Ping submitted succesfully."
64-
), 60* 5000);
64+
), 5000);
6565

6666
console.log("Test passed.");
6767
} catch(e) {

0 commit comments

Comments
 (0)