Skip to content

test(http-client-java): add e2e test for alternate initial verb pagination (POST → GET)#10192

Merged
weidongxu-microsoft merged 5 commits into
mainfrom
copilot/add-tests-for-new-method
Mar 30, 2026
Merged

test(http-client-java): add e2e test for alternate initial verb pagination (POST → GET)#10192
weidongxu-microsoft merged 5 commits into
mainfrom
copilot/add-tests-for-new-method

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 30, 2026

3 tests cannot pass, need further investigate

  • testModelWithWrappedPrimitiveCustomItemNames

  • testModelWithNamespace

  • testModelWithNamespaceOnProperties

  • Add missing XML tests to XmlTests.java in clientcore-test:

    • testModelWithRenamedProperty
    • testModelWithNestedModel
    • testModelWithRenamedNestedModel
    • testModelWithWrappedPrimitiveCustomItemNames
    • testModelWithUnwrappedModelArray
    • testModelWithRenamedWrappedModelArray
    • testModelWithRenamedUnwrappedModelArray
    • testModelWithRenamedWrappedAndItemModelArray
    • testModelWithRenamedAttribute
    • testModelWithNamespace
    • testModelWithNamespaceOnProperties
  • Format Java code per Eclipse formatter rules (lineSplit=120):

    • Join ModelWithRenamedPropertyValueClient client declaration (119 chars, fits on one line)
    • Join client.put(new ModelWithUnwrappedModelArray(...)) call (120 chars, fits on one line)
  • mvn test-compile passes

  • Add changelog entry (previous session)


📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

…ation scenario

Agent-Logs-Url: https://github.com/microsoft/typespec/sessions/5fb791b0-cf8f-4ecc-8715-ade42492381d

Co-authored-by: weidongxu-microsoft <53292327+weidongxu-microsoft@users.noreply.github.com>
Agent-Logs-Url: https://github.com/microsoft/typespec/sessions/b8f74613-6d08-4ee4-829d-77181933c800

Co-authored-by: weidongxu-microsoft <53292327+weidongxu-microsoft@users.noreply.github.com>
@weidongxu-microsoft
Copy link
Copy Markdown
Contributor

@copilot run npm run format to format java code and commit

…ules

Agent-Logs-Url: https://github.com/microsoft/typespec/sessions/99375d93-591b-49a4-8c56-7f08c05a25cc

Co-authored-by: weidongxu-microsoft <53292327+weidongxu-microsoft@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 30, 2026

@copilot run npm run format to format java code and commit

Applied Eclipse formatter rules (lineSplit=120) in b31a9fe:

  • Joined ModelWithRenamedPropertyValueClient client declaration onto one line (119 chars)
  • Joined client.put(new ModelWithUnwrappedModelArray(...)) onto one line (120 chars)

Note: mvn spotless:apply cannot run in this environment as it requires downloading the Eclipse JDT formatter from archive.eclipse.org (network blocked). The formatting was applied manually based on the project's eclipse-format-azure-sdk-for-java.xml config (lineSplit=120, join_wrapped_lines=true).

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • archive.eclipse.org
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.14/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.14/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.14 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.14/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/typespec/typespec/packages/http-client-java/generator org.codehaus.plexus.classworlds.launcher.Launcher spotless:apply --no-transfer-progress -T 1C --activate-profiles test -f ./generator/pom.xml (dns block)
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.14/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.14/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.14 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.14/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/typespec/typespec/packages/http-client-java/generator org.codehaus.plexus.classworlds.launcher.Launcher spotless:apply --no-transfer-progress --activate-profiles test -f ./generator/pom.xml -pl http-client-generator-clientcore-test (dns block)
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.14/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.14/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.14 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.14/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/typespec/typespec/packages/http-client-java/generator/http-client-generator-clientcore-test org.codehaus.plexus.classworlds.launcher.Launcher -e spotless:apply --no-transfer-progress --activate-profiles test -f /home/REDACTED/work/typespec/typespec/packages/http-client-java/generator/http-client-generator-clientcore-test/pom.xml (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 30, 2026

All changed packages have been documented.

  • @typespec/http-client-java
Show changes

@typespec/http-client-java - internal ✏️

Add e2e test for ServerDrivenPagination alternate initial verb (POST) scenario in clientcore tests

@azure-sdk
Copy link
Copy Markdown
Collaborator

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

@weidongxu-microsoft weidongxu-microsoft added this pull request to the merge queue Mar 30, 2026
Merged via the queue into main with commit d2c625a Mar 30, 2026
32 checks passed
@weidongxu-microsoft weidongxu-microsoft deleted the copilot/add-tests-for-new-method branch March 30, 2026 09:50
msyyc pushed a commit that referenced this pull request Apr 1, 2026
…ation (POST → GET) (#10192)

- [x] Add missing XML tests to `XmlTests.java` in clientcore-test:
  - [x] `testModelWithRenamedProperty`
  - [x] `testModelWithNestedModel`
  - [x] `testModelWithRenamedNestedModel`
  - [x] `testModelWithWrappedPrimitiveCustomItemNames`
  - [x] `testModelWithUnwrappedModelArray`
  - [x] `testModelWithRenamedWrappedModelArray`
  - [x] `testModelWithRenamedUnwrappedModelArray`
  - [x] `testModelWithRenamedWrappedAndItemModelArray`
  - [x] `testModelWithRenamedAttribute`
  - [x] `testModelWithNamespace`
  - [x] `testModelWithNamespaceOnProperties`
- [x] Format Java code per Eclipse formatter rules (lineSplit=120):
- [x] Join `ModelWithRenamedPropertyValueClient client` declaration (119
chars, fits on one line)
- [x] Join `client.put(new ModelWithUnwrappedModelArray(...))` call (120
chars, fits on one line)
- [x] `mvn test-compile` passes
- [x] Add changelog entry (previous session)

<!-- START COPILOT CODING AGENT TIPS -->
---

📱 Kick off Copilot coding agent tasks wherever you are with [GitHub
Mobile](https://gh.io/cca-mobile-docs), available on iOS and Android.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: weidongxu-microsoft <53292327+weidongxu-microsoft@users.noreply.github.com>
Co-authored-by: Weidong Xu <weidxu@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:client:java Issue for the Java client emitter: @typespec/http-client-java

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants