Skip to content

Java uses the default JSON endpoint and still accepts the old one - #23

Draft
jwrosewell wants to merge 1 commit into
mainfrom
java-default-json-endpoint
Draft

jwrosewell wants to merge 1 commit into
mainfrom
java-default-json-endpoint

Conversation

@jwrosewell

Copy link
Copy Markdown
Contributor

Problem

The Java descriptor in Examples/ExampleApps.cs sets JsonEndpointPath to /51Degrees.core.json. The specification's path is /51dpipeline/json, which .NET and Go use and which is this suite's default. 51degrees-java draft #80 (head 2d741ef6) makes Java default to /51dpipeline/json and still answer the old path, and the script it serves calls /51dpipeline/json. With the old override the session storage cache test proxies and counts only /51Degrees.core.json, so Java #80's full build fails with "the first page must call the json endpoint at least once".

Change

  1. The Java descriptor no longer overrides JsonEndpointPath, so Java uses the default like the other languages.
  2. ExampleDescriptor gains AlternativeJsonEndpointPaths, older paths an integration still answers. Java lists /51Degrees.core.json there.
  3. ExampleApps.JsonEndpointPaths returns the default plus those alternatives. TestHelpers.ExampleProxyListener proxies every path in the list, and the session storage cache test counts POSTs to any of them.

The suite therefore passes against Java rc (script calls /51Degrees.core.json) and against Java #80 (script calls /51dpipeline/json). The merge order does not matter, and the alternative path can be removed once Java #80 has reached rc and main.

How this was checked

Java's CI clones this repository's main in ci/run-integration-tests.ps1 (line 97), honouring an environment variable SELENIUM_TESTS_REF. Nothing in common-ci's nightly-pull-request.yml or Java's workflows sets that variable or accepts one, so Java #80's full build cannot be pointed at this branch without changing 51degrees-java or merging here. It has not been run against this branch. This repository has no secrets, so its own workflow cannot run the Contract tests either.

This repository's own Build and test workflow runs on this pull request and proves the change compiles and the non-browser tests pass.

Remaining

After merge, rerun Java #80's full build (and Java rc's) to confirm the contract tests pass with both script paths.

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.

1 participant