Skip to content

GH-3852: Fixing Fuseki UI test:e2e:win32#3853

Merged
OyvindLGjesdal merged 1 commit intoapache:mainfrom
arne-bdt:GH-3852-fixing-fuseki-ui-test_e2e_win32
Apr 11, 2026
Merged

GH-3852: Fixing Fuseki UI test:e2e:win32#3853
OyvindLGjesdal merged 1 commit intoapache:mainfrom
arne-bdt:GH-3852-fixing-fuseki-ui-test_e2e_win32

Conversation

@arne-bdt
Copy link
Copy Markdown
Contributor

GitHub issue resolved #3852

Pull request Description:

Fixed "test:e2e:win32" in jena-fuseki2/jena-fuseki-ui/package.json:

SET /a (FUSEKI_PORT=FUSEKI_PORT ^ 3030)
--> produced: missing brackets

${FUSEKI_PORT}
--> is unix syntax, not windows

Same with PORT.


  • Tests are included.
  • Commits have been squashed to remove intermediate development commit messages.
  • Key commit messages start with the issue number (GH-xxxx)

By submitting this pull request, I acknowledge that I am making a contribution to the Apache Software Foundation under the terms and conditions of the Contributor's Agreement.


See the Apache Jena "Contributing" guide.

@OyvindLGjesdal
Copy link
Copy Markdown
Contributor

OyvindLGjesdal commented Apr 11, 2026

The change breaks (doesn't run tests) for the windows github workflow that admittedly uses bash for starting it.

I think it fails during startup, and then skips all the tests.

[INFO] yarn run v1.22.17
[INFO] $ run-script-os
[INFO] $ IF NOT DEFINED FUSEKI_PORT (SET FUSEKI_PORT=3030)& IF NOT DEFINED PORT (SET PORT=8080)& cross-env concurrently --names 'SERVER,CLIENT,TESTS' --prefix-colors 'yellow,blue,green' --success 'first' --kill-others "yarn run serve:fuseki" "yarn wait-on http://localhost:%FUSEKI_PORT%/$/ping && yarn run dev" "yarn wait-on http-get://localhost:%PORT%/index.html && cypress run %*"
[INFO] Done in 0.38s.
[INFO] 
[INFO] --- jar:3.5.0:jar (default-jar) @ jena-fuseki-ui ---
[INFO] Building jar: C:\jena\jena-fuseki2\jena-fuseki-ui\target\jena-fuseki-ui-6.1.0-SNAPSHOT.jar

By default the github-runner run action on windows uses powershell if a shell isn't defined, and you can chose between powershell, cmd and bash, when configuring run actions (while now it currently runs bash -c "command" from powershell.)

I think I tried getting it to run with cmd first, and then ended up with using bash, because the solution that worked locally in cmd didn't work because the options for it (SET) are already defined. See https://github.com/actions/runner-images/blob/main/images/windows/Windows2025-Readme.md for reference on the runner.

Which of powershell or cmd should the change work for?

I did a quick check on deleting "bash -c" and running it on powershell by default

run: mvn -B --file pom.xml "-Dmaven.javadoc.skip=true" install

But that also had the same issue of the tests not running in GH-action.

Trying to use shell: cmd for the mvn task fails the job earlier with something unrelated:

Error:  Could not create report parent directory c:\jena\c:\jena\target\rat.txt
Warning:  Unable to create directory: c:\jena\c:\jena\target

@arne-bdt
Copy link
Copy Markdown
Contributor Author

The change breaks (doesn't run tests) for the windows github workflow that admittedly uses bash for starting it.

I think it fails during startup, and then skips all the tests.

[INFO] yarn run v1.22.17
[INFO] $ run-script-os
[INFO] $ IF NOT DEFINED FUSEKI_PORT (SET FUSEKI_PORT=3030)& IF NOT DEFINED PORT (SET PORT=8080)& cross-env concurrently --names 'SERVER,CLIENT,TESTS' --prefix-colors 'yellow,blue,green' --success 'first' --kill-others "yarn run serve:fuseki" "yarn wait-on http://localhost:%FUSEKI_PORT%/$/ping && yarn run dev" "yarn wait-on http-get://localhost:%PORT%/index.html && cypress run %*"
[INFO] Done in 0.38s.
[INFO] 
[INFO] --- jar:3.5.0:jar (default-jar) @ jena-fuseki-ui ---
[INFO] Building jar: C:\jena\jena-fuseki2\jena-fuseki-ui\target\jena-fuseki-ui-6.1.0-SNAPSHOT.jar

By default the github-runner run action on windows uses powershell if a shell isn't defined, and you can chose between powershell, cmd and bash, when configuring run actions (while now it currently runs bash -c "command" from powershell.)

I think I tried getting it to run with cmd first, and then ended up with using bash, because the solution that worked locally in cmd didn't work because the options for it (SET) are already defined. See https://github.com/actions/runner-images/blob/main/images/windows/Windows2025-Readme.md for reference on the runner.

Which of powershell or cmd should the change work for?

I did a quick check on deleting "bash -c" and running it on powershell by default

run: mvn -B --file pom.xml "-Dmaven.javadoc.skip=true" install

But that also had the same issue of the tests not running in GH-action.

@OyvindLGjesdal Thanks, for your explanation.

Unfortunately I cannot reproduce the GitLabRunner behaviour on my machine. My IDE should also use bash...
This variant works too and it uses powershell instead of cmd. Could you try this?

"test:e2e:win": "powershell -NoProfile -ExecutionPolicy Bypass -Command \"if (-not $env:FUSEKI_PORT) { $env:FUSEKI_PORT='3030' }; if (-not $env:PORT) { $env:PORT='8080' }; $extra = $args -join ' '; concurrently --names SERVER,CLIENT,TESTS --prefix-colors yellow,blue,green --success first --kill-others 'yarn run serve:fuseki' ('yarn wait-on http://localhost:' + $env:FUSEKI_PORT + '/$/ping && yarn run dev') ('yarn wait-on http-get://localhost:' + $env:PORT + '/index.html && cypress run ' + $extra)\" --",

@OyvindLGjesdal
Copy link
Copy Markdown
Contributor

OyvindLGjesdal commented Apr 11, 2026

I get a for me not so helpful error message: (edit, I think it just is missing 33 from test:e2e:win -> test:e2e:win32, running again)

[INFO] yarn run v1.22.17
[INFO] $ run-script-os
[INFO] run-script-os was unable to execute the script 'test:e2e'
[INFO] error Command failed with exit code 254.
[INFO] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

not sure if the action is browsable:

https://github.com/OyvindLGjesdal/jena/actions/runs/24278345266/job/70896002093

from a local copy of your branch https://github.com/OyvindLGjesdal/jena/tree/GH-3852-fixing-fuseki-ui-test_e2e_win32

@OyvindLGjesdal
Copy link
Copy Markdown
Contributor

OyvindLGjesdal commented Apr 11, 2026

Yes, the updated e2e from you

 "test:e2e:win32": "powershell -NoProfile -ExecutionPolicy Bypass -Command \"if (-not $env:FUSEKI_PORT) { $env:FUSEKI_PORT='3030' }; if (-not $env:PORT) { $env:PORT='8080' }; $extra = $args -join ' '; concurrently --names SERVER,CLIENT,TESTS --prefix-colors yellow,blue,green --success first --kill-others 'yarn run serve:fuseki' ('yarn wait-on http://localhost:' + $env:FUSEKI_PORT + '/$/ping && yarn run dev') ('yarn wait-on http-get://localhost:' + $env:PORT + '/index.html && cypress run ' + $extra)\" --",

runs the action and tests successfully 👍 It also works without updating the github workflow windows file, so this change should be enough.

[INFO] --- frontend:2.0.0:yarn (yarn run test:e2e) @ jena-fuseki-ui ---
[INFO] Running 'yarn run test:e2e' in C:\jena\jena-fuseki2\jena-fuseki-ui
[INFO] yarn run v1.22.17
[INFO] $ run-script-os
[INFO] $ powershell -NoProfile -ExecutionPolicy Bypass -Command "if (-not $env:FUSEKI_PORT) { $env:FUSEKI_PORT='3030' }; if (-not $env:PORT) { $env:PORT='8080' }; $extra = $args -join ' '; concurrently --names SERVER,CLIENT,TESTS --prefix-colors yellow,blue,green --success first --kill-others 'yarn run serve:fuseki' ('yarn wait-on http://localhost:' + $env:FUSEKI_PORT + '/$/ping && yarn run dev') ('yarn wait-on http-get://localhost:' + $env:PORT + '/index.html && cypress run ' + $extra)" --
[INFO] [SERVER] $ nodemon src/services/mock/json-server.js
[INFO] [CLIENT] $ C:\jena\jena-fuseki2\jena-fuseki-ui\node_modules\.bin\wait-on http://localhost:65459/$/ping
[INFO] [TESTS] $ C:\jena\jena-fuseki2\jena-fuseki-ui\node_modules\.bin\wait-on http-get://localhost:65460/index.html
[INFO] [SERVER] [nodemon] 3.1.14
[INFO] [SERVER] [nodemon] to restart at any time, enter `rs`
[INFO] [SERVER] [nodemon] watching path(s): *.*
[INFO] [SERVER] [nodemon] watching extensions: js,mjs,cjs,json
[INFO] [SERVER] [nodemon] starting `node src/services/mock/json-server.js`
[INFO] [SERVER] JSON Server is running
[INFO] [SERVER] HEAD /$/ping 200 3.619 ms - 40
[INFO] [CLIENT] $ vite
[INFO] [CLIENT] 
[INFO] [CLIENT]   VITE v7.3.2  ready in 857 ms
[INFO] [CLIENT] 
[INFO] [CLIENT]   ?  Local:   http://localhost:65460/
[INFO] [CLIENT]   ?  Network: use --host to expose
[INFO] [TESTS] It looks like this is your first time using Cypress: 15.13.1
[INFO] [TESTS] 
[INFO] [TESTS] [09:41:40]  Verifying Cypress can run C:\Users\runneradmin\AppData\Local\Cypress\Cache\15.13.1\Cypress [started]
[INFO] [TESTS] [09:41:42]  Verifying Cypress can run C:\Users\runneradmin\AppData\Local\Cypress\Cache\15.13.1\Cypress [COMPLETED]
[INFO] [TESTS] 
[INFO] [TESTS] Opening Cypress...
[INFO] [TESTS] 
[INFO] [TESTS] 
[INFO] [TESTS] ====================================================================================================
[INFO] [TESTS] 
[INFO] [TESTS]   (Run Starting)
[INFO] [TESTS] 
[INFO] [TESTS]   ??????????????????????????????????????????????????????????????????????????????????????????????????
[INFO] [TESTS]   ? Cypress:        15.13.1                                                                        ?
[INFO] [TESTS]   ? Browser:        Electron 138 (headless)                                                        ?
[INFO] [TESTS]   ? Node Version:   v20.19.3 (C:\jena\jena-fuseki2\jena-fuseki-ui\node\node.exe)                   ?
[INFO] [TESTS]   ? Specs:          3 found (datasets.cy.js, query.cy.js, upload.cy.js)                            ?
[INFO] [TESTS]   ? Searched:       tests/e2e/specs/**/*.cy.{js,jsx,ts,tsx}                                        ?
[INFO] [TESTS]   ??????????????????????????????????????????????????????????????????????????????????????????????????
[INFO] [TESTS] 
[INFO] [TESTS] 
[INFO] [TESTS] ????????????????????????????????????????????????????????????????????????????????????????????????????
[INFO] [TESTS]                                                                                                     
[INFO] [TESTS]   Running:  datasets.cy.js                                                                  (1 of 3)
[INFO] [TESTS] Generated an empty chunk: "index".
[INFO] [TESTS] 
[INFO] [TESTS] 
[INFO] [TESTS]   datasets
[INFO] [TESTS]     without any datasets
[INFO] [SERVER] GET /tests/reset 200 0.742 ms - 2
[INFO] [SERVER] GET /$/ping 200 0.461 ms - 40
[INFO] [SERVER] GET /$/server 200 0.523 ms - 105
[INFO] [TESTS]       ? Visits datasets page, also the application landing-page (904ms)
[INFO] [SERVER] GET /$/ping 200 0.564 ms - 40
[INFO] [SERVER] GET /$/server 304 0.839 ms - -
[INFO] [SERVER] GET /tests/reset 200 0.332 ms - 2
[INFO] [TESTS]       ? Filters without any data (564ms)
....

@arne-bdt arne-bdt force-pushed the GH-3852-fixing-fuseki-ui-test_e2e_win32 branch from c5efce5 to 9ab9871 Compare April 11, 2026 10:57
@arne-bdt arne-bdt marked this pull request as draft April 11, 2026 11:01
Fixed "test:e2e:win32" in jena-fuseki2/jena-fuseki-ui/package.json:

SET /a (FUSEKI_PORT=FUSEKI_PORT ^ 3030)
--> produced: missing brackets

${FUSEKI_PORT}
--> is unix syntax, not windows

Switched from cmd to powershell
@arne-bdt arne-bdt force-pushed the GH-3852-fixing-fuseki-ui-test_e2e_win32 branch from 9ab9871 to 5b923dc Compare April 11, 2026 11:16
@arne-bdt arne-bdt marked this pull request as ready for review April 11, 2026 11:16
@OyvindLGjesdal OyvindLGjesdal merged commit ca3a213 into apache:main Apr 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fuseki UI - "test:e2e:win32" does not work on windows

3 participants