Skip to content

JSPWIKI-1369 Make the integration tests pass again - #638

Open
arturobernalg wants to merge 1 commit into
apache:masterfrom
arturobernalg:fix-1369-it-hover
Open

arturobernalg wants to merge 1 commit into
apache:masterfrom
arturobernalg:fix-1369-it-hover

Conversation

@arturobernalg

Copy link
Copy Markdown
Member

The integration tests read the page before the menus, the live preview or the page that follows a login or a save were ready, and three assumptions in the test setup were out of date.

  • The tests wait for the menus to open, for the preview to refresh and for the next page to load.
  • The editor refreshes its preview on input events, which setting the value of the field does not fire, so the test fires one.
  • The HSQL schema of the test user database gets the oldhashes column that JDBCUserDatabase writes.
  • The web descriptors of the test wars use the Jakarta namespace WebContainerAuthorizer looks for. With the old namespace the container authentication was not detected and the login of the cma modules failed.
  • LoginIT expects the login name, which is what the wiki shows for a logged in user.

Executed on this branch, with -Pintegration-tests and one module at a time: jspwiki-it-test-custom, custom-absolute-urls, custom-jdbc, cma and cma-jdbc each run 7 tests, 0 failures. Before the change custom failed 5 tests and the other modules failed 3 or 4 on the same code. mvn clean package -Pintegration-tests on the whole reactor succeeds.

The CI job runs package, which stops before the integration-test phase, so these tests are not run by CI.

@spyhunter99

The tests wait for the menus to open, for the live preview to refresh and
for the page that follows a login or a save, instead of reading the page
while it is still loading. The editor refreshes its preview on input
events, which setting the value of the field does not fire, so the test
fires one.

The test user database gets the oldhashes column the JDBC user database
writes, and the web descriptors of the test wars use the Jakarta namespace
the container authorizer looks for. The login test expects the login name,
which is what the wiki shows for the logged in user.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant