kinow commented on issue #1644:
URL: https://github.com/apache/jena/issues/1644#issuecomment-1366891289

   @afs do you have a machine where you can reproduce this issue? If so, I 
**think** this could solve it:
   
   ```diff
   diff --git a/jena-fuseki2/jena-fuseki-ui/tests/e2e/specs/datasets.cy.js 
b/jena-fuseki2/jena-fuseki-ui/tests/e2e/specs/datasets.cy.js
   index f2f281ccf2..26e7914af2 100644
   --- a/jena-fuseki2/jena-fuseki-ui/tests/e2e/specs/datasets.cy.js
   +++ b/jena-fuseki2/jena-fuseki-ui/tests/e2e/specs/datasets.cy.js
   @@ -55,21 +55,19 @@ describe('datasets', () => {
            //       so we use a ?temp=... in the URL to force distinct 
requests.
            cy
              .visit(`/#/manage/new?temp=${datasetName}`)
   -          .then(() => {
   -            cy
   -              .get('#dataset-name')
   -              .type(datasetName)
   -            cy
   -              .get('#data-set-type-mem')
   -              .click()
   -            cy
   -              .get('button[type="submit"]')
   -              .click()
   -            // We are redirected to the Manage datasets view.
   -            cy
   -              .get('table.jena-table')
   -              .should('be.visible')
   -          })
   +        cy
   +          .get('#dataset-name')
   +          .type(datasetName)
   +        cy
   +          .get('#data-set-type-mem')
   +          .click()
   +        cy
   +          .get('button[type="submit"]')
   +          .click()
   +        // We are redirected to the Manage datasets view.
   +        cy
   +          .get('table.jena-table')
   +          .should('be.visible')
          }
        })
        after(() => {
   @@ -257,22 +255,20 @@ describe('datasets', () => {
          cy.route('POST', '/$/datasets').as('post')
          cy
            .visit('/#/manage/new')
   -        .then(() => {
   -          cy
   -            .get('#dataset-name')
   -            .type('a')
   -          cy
   -            .get('#data-set-type-mem')
   -            .click()
   -          cy
   -            .get('button[type="submit"]')
   -            .click()
   -          // Now the UI must have received an HTTP response with status 
code 409
   -          // from Jena, due to the duplicate dataset name.
   -          cy
   -            .get('@post')
   -            .should('have.property', 'status', 409)
   -        })
   +      cy
   +        .get('#dataset-name')
   +        .type('a')
   +      cy
   +        .get('#data-set-type-mem')
   +        .click()
   +      cy
   +        .get('button[type="submit"]')
   +        .click()
   +      // Now the UI must have received an HTTP response with status code 409
   +      // from Jena, due to the duplicate dataset name.
   +      cy
   +        .get('@post')
   +        .should('have.property', 'status', 409)
        })
        it('Visualizes the dataset information (Info View, tab)', () => {
          cy.visit('/#/dataset/a/info')
   diff --git a/jena-fuseki2/jena-fuseki-ui/tests/e2e/specs/query.cy.js 
b/jena-fuseki2/jena-fuseki-ui/tests/e2e/specs/query.cy.js
   index 0e90435a0c..3da4422923 100644
   --- a/jena-fuseki2/jena-fuseki-ui/tests/e2e/specs/query.cy.js
   +++ b/jena-fuseki2/jena-fuseki-ui/tests/e2e/specs/query.cy.js
   @@ -25,21 +25,19 @@ describe('Query', () => {
        // Create a sample dataset.
        cy
          .visit('/#/manage/new')
   -      .then(() => {
   -        cy
   -          .get('#dataset-name')
   -          .type('skosmos')
   -        cy
   -          .get('#data-set-type-mem')
   -          .click()
   -        cy
   -          .get('button[type="submit"]')
   -          .click()
   -        // We are redirected to the Manage datasets view.
   -        cy
   -          .get('table.jena-table')
   -          .should('be.visible')
   -      })
   +    cy
   +      .get('#dataset-name')
   +      .type('skosmos')
   +    cy
   +      .get('#data-set-type-mem')
   +      .click()
   +    cy
   +      .get('button[type="submit"]')
   +      .click()
   +    // We are redirected to the Manage datasets view.
   +    cy
   +      .get('table.jena-table')
   +      .should('be.visible')
      })
      after(() => {
        // Special endpoint that clears the datasets data.
   ```
   
   I was running things inside the `.then()` block that are required for the 
tests. My guess is that in some cases that blocks may be still running when the 
tests that depend on it have already started, causing some tests to fail 
:crossed_fingers: :drum: 


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to