Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content Type Check + Leaner Simulator JAR #49

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

wied03
Copy link
Contributor

@wied03 wied03 commented Apr 29, 2024

  1. Published simulator JAR, as is, has all the tests for PMVC itself in it as well, which is not needed on other projects. Alternatively, perhaps better, the simulator source could be moved to a different directory so we are not cherry picking with regexes quite as much but that might require more Savant changes.

  2. JSON assertions do not check the content type. It's unlikely it would be wrong, but this ensures it's checked.

@wied03 wied03 changed the base branch from master to cors_flexibility April 29, 2024 14:35
@wied03 wied03 force-pushed the cors_flexibility branch 2 times, most recently from 3bbc943 to 05bc662 Compare May 1, 2024 20:05
Base automatically changed from cors_flexibility to master May 1, 2024 21:39
@wied03 wied03 force-pushed the wied03/leaner_simulator_jar branch from 85e2a88 to bd58252 Compare May 1, 2024 21:51
@wied03 wied03 force-pushed the wied03/leaner_simulator_jar branch from 5296e5d to 3fd43f1 Compare June 22, 2024 17:27
@wied03 wied03 changed the title Leaner Simulator JAR Content Type Check + Leaner Simulator JAR Jun 22, 2024
@wied03 wied03 marked this pull request as ready for review June 22, 2024 17:29
@wied03 wied03 requested a review from robotdan June 22, 2024 17:29
…anyways

Pull the nested classes out, such that:
1) We don't have to craft a regex to deal with including RequestResult$TestURIBuilder.class, but still exclude the other tests
2) RequestResult is not so big
@wied03
Copy link
Contributor Author

wied03 commented Jun 24, 2024

Over the weekend, it occurred to me I should diff the JARs just to be sure. and I found some issues that I fixed with more regex's. I ran this with a couple cleanspeak apps and it worked fine,

I think this path, although it can work OK, it feels brittle. To me the best way to solve it though may not be attainable right now because it ideally would require multi-module building.

We'd need these modules:

  1. PMVC main (today's src/main/java).
  2. PMVC simulator (anything that goes into the simulator artifact today would go in here)
    • Depends on PMVC main
  3. PMVC tests - tests for PMVC that use the simulator
    • Depends on PMVC main
    • Depends on PMVC simulator

To me this would be the only "foolproof" way of ensuring that the simulator JAR ends up with all the right classes in it, even if they are refactored/moved around.

We could imitate that with Savant by adding more build.savant files and having the 'parent' one call sb int etc. on the child ones.

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