You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@jena.apache.org by GitBox <gi...@apache.org> on 2022/11/19 19:11:25 UTC

[GitHub] [jena] kinow opened a new pull request, #1630: [GH-1622] Make the Jena Fuseki UI and Vue ports dynamic for the e2e tests

kinow opened a new pull request, #1630:
URL: https://github.com/apache/jena/pull/1630

   GitHub issue resolved #1622 
   
   Pull request Description:
   
   The `PORT` env var is used by Vue dev server. I only defined a new env var `FUSEKI_PORT`. The default values are the same, `8080` and `3030`.
   
   In `pom.xml` for the Jena Fuseki UI module a Maven plug-in is used to allocate two network ports (it will search two free) and define Maven properties. In the Maven Frontend plug-in, these environment variables are then used to define `PORT` and `FUSEKI_PORT`.
   
   I tested by starting `python3 -m http.server 3030` in one terminal, `watch -n 2 netstat -tlnp` in another, and then running `mvn test` in the Jena Fuseki UI module folder.
   
   ![Screenshot from 2022-11-19 19-39-05](https://user-images.githubusercontent.com/304786/202866835-0dbf8bc1-fe4e-4892-b75d-2259815430ab.png)
   
   ![Screenshot from 2022-11-19 19-38-18](https://user-images.githubusercontent.com/304786/202866840-ef603c67-9823-48b0-ad5a-89cf761e46dc.png)
   
   ![Screenshot from 2022-11-19 19-38-37](https://user-images.githubusercontent.com/304786/202866842-b5c6d359-e51c-4549-ac9a-f284d093f7c2.png)
   
   
   ----
   
    - [x] Tests are included.
    - [ ] Documentation change and updates are provided for the [Apache Jena website](https://github.com/apache/jena-site/)
    - [x] Commits have been squashed to remove intermediate development commit messages.
    - [x] Key commit messages start with the issue number (GH-xxxx or JENA-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](https://www.apache.org/licenses/contributor-agreements.html).
   
   ----
   
   See the [Apache Jena "Contributing" guide](https://github.com/apache/jena/blob/main/CONTRIBUTING.md).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] afs commented on pull request #1630: [GH-1622] Make the Jena Fuseki UI and Vue ports dynamic for the e2e tests

Posted by GitBox <gi...@apache.org>.
afs commented on PR #1630:
URL: https://github.com/apache/jena/pull/1630#issuecomment-1321104421

   Works fine on my (troublesome) machine.
   
   Q: Where do the tests actually invoke the java for the Fuseki server?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] kinow commented on pull request #1630: [GH-1622] Make the Jena Fuseki UI and Vue ports dynamic for the e2e tests

Posted by GitBox <gi...@apache.org>.
kinow commented on PR #1630:
URL: https://github.com/apache/jena/pull/1630#issuecomment-1320950402

   The screenshots are not really helpful, I think. But the output of `netstat` starts with few ports including `3030`, gets more ports while the tests run, and then goes back to the initial state with `3030` bound by `python3 -m http.server 3030`.
   
   And the tests have run successfully :slightly_smiling_face: 
   
   Also tested running the backend with Eclipse and then `yarn run serve`, and everything worked as before (this is how I develop the UI).
   
   Whether we move the e2e tests out of the main execution, and into a profile, at least this PR will make sure that the tests can be executed regardless of whether another instance of Fuseki is already running or not.
   
   :+1: 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] afs commented on pull request #1630: [GH-1622] Make the Jena Fuseki UI and Vue ports dynamic for the e2e tests

Posted by GitBox <gi...@apache.org>.
afs commented on PR #1630:
URL: https://github.com/apache/jena/pull/1630#issuecomment-1321831601

   Our github actions and Jenkins jobs work.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] kinow commented on pull request #1630: [GH-1622] Make the Jena Fuseki UI and Vue ports dynamic for the e2e tests

Posted by GitBox <gi...@apache.org>.
kinow commented on PR #1630:
URL: https://github.com/apache/jena/pull/1630#issuecomment-1321107475

   >Q: Where do the tests actually invoke the java for the Fuseki server?
   
   The e2e tests actually never call a real Fuseki server.
   
   We start the [e2e](https://github.com/apache/jena/blob/7f5da174900444d9b2828f97c64ac3bd209724cf/jena-fuseki2/jena-fuseki-ui/package.json#L12) script, that runs two commands: [a fake fuseki server](https://github.com/apache/jena/blob/7f5da174900444d9b2828f97c64ac3bd209724cf/jena-fuseki2/jena-fuseki-ui/package.json#L16) and Vue's dev utils e2e script. The fake Fuseki server listens to `3030` requests by default and returns [pre-defined responses](https://github.com/apache/jena/blob/7f5da174900444d9b2828f97c64ac3bd209724cf/jena-fuseki2/jena-fuseki-ui/src/services/mock/json-server.js) for some endpoints.
   
   Vue's e2e script takes care to initialize and run the e2e tests. And some of these tests can also abstract the network layer, creating fake responses within the tests, so that the fake Fuseki server doesn't need to have a lot of `if/else` statements. e.g. https://github.com/apache/jena/blob/7f5da174900444d9b2828f97c64ac3bd209724cf/jena-fuseki2/jena-fuseki-ui/tests/e2e/specs/query.cy.js#L55-L60.
   
   I think the downside of this test design is that if the Java Fuseki endpoints change, we need to update the fake Fuseki endpoints and tests. An alternative would be to start a real Fuseki server, populate it, and run the e2e tests.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] afs commented on pull request #1630: [GH-1622] Make the Jena Fuseki UI and Vue ports dynamic for the e2e tests

Posted by GitBox <gi...@apache.org>.
afs commented on PR #1630:
URL: https://github.com/apache/jena/pull/1630#issuecomment-1321115481

   Thanks for the explanation - that's why I can't find it! 😺 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] kinow commented on pull request #1630: [GH-1622] Make the Jena Fuseki UI and Vue ports dynamic for the e2e tests

Posted by GitBox <gi...@apache.org>.
kinow commented on PR #1630:
URL: https://github.com/apache/jena/pull/1630#issuecomment-1328065233

   Had forgotten about this PR. Thought I had merged it, sorry. Merging now 🎉


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] kinow commented on pull request #1630: [GH-1622] Make the Jena Fuseki UI and Vue ports dynamic for the e2e tests

Posted by GitBox <gi...@apache.org>.
kinow commented on PR #1630:
URL: https://github.com/apache/jena/pull/1630#issuecomment-1322022087

   > Note, the tests still fail on servers unless you have some X-server libs installed, i.e. for Debian I had to install the requirements mentioned here: https://docs.cypress.io/guides/continuous-integration/introduction#Machine-requirements
   > 
   > Assuming that not all people build Jena on a desktop machine, some pointer wherever in the documentation would be helpful when building Jena from source.
   
   Ah good point. What do you suggest? A note in Jena Fuseki UI README.md, a BUILD.md file, a text somewhere in jena.apache.org?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] LorenzBuehmann commented on pull request #1630: [GH-1622] Make the Jena Fuseki UI and Vue ports dynamic for the e2e tests

Posted by GitBox <gi...@apache.org>.
LorenzBuehmann commented on PR #1630:
URL: https://github.com/apache/jena/pull/1630#issuecomment-1321711418

   Note, the tests still fail on servers unless you have some X-server installed, i.e. for Debian I had to install the requirements mentioned here: https://docs.cypress.io/guides/continuous-integration/introduction#Machine-requirements
   
   Assuming that not all people build Jena on a desktop machine, some pointer wherever in the documentation would be helpful when building Jena from source.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] afs commented on pull request #1630: [GH-1622] Make the Jena Fuseki UI and Vue ports dynamic for the e2e tests

Posted by GitBox <gi...@apache.org>.
afs commented on PR #1630:
URL: https://github.com/apache/jena/pull/1630#issuecomment-1328060912

   Shall I merge this?
   
   The discussion on necessary requisites is orthogonal.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] kinow merged pull request #1630: [GH-1622] Make the Jena Fuseki UI and Vue ports dynamic for the e2e tests

Posted by GitBox <gi...@apache.org>.
kinow merged PR #1630:
URL: https://github.com/apache/jena/pull/1630


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org