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

Refactor JPA tests (work in progress) #1561

Merged
merged 34 commits into from
Oct 6, 2024

Conversation

scottmarlow
Copy link
Contributor

Fixes Issue
Work in progress for #1371

Describe the change
3578 of the PmServlet/PuServlet tests are passing. Still have some failures to work out in PmServlet/PuServlet tests. Likely more setup/cleanup issues.

just made a change for appclient tests which is where most of the remaining work is but that might just require syncing the PmServlet/PuServlet changes over mostly, will see.

CC @alwin-joseph @anajosep @arjantijms @cesarhernandezgt @dblevins @m0mus @edbratt @gurunrao @jansupol @jgallimore @kazumura @kwsutter @LanceAndersen @bhatpmk @RohitKumarJain @shighbar @gthoman @brideck @OndroMih @dmatej
@starksm64 @scottmarlow

….storedprocedures.CS_Procs

Signed-off-by: Scott Marlow <[email protected]>
Signed-off-by: Scott Marlow <[email protected]>
Signed-off-by: Scott Marlow <[email protected]>
Signed-off-by: Scott Marlow <[email protected]>
… jpa tests that use appclient protocol

Signed-off-by: Scott Marlow <[email protected]>
… change but latest as of August 28, 2024 tck-rewrite/tck-rewrite-ant"

This reverts commit 671ae39.
…ent2.setupEmployee + ee.jakarta.tck.persistence.core.entityManager.Client2.cleanupData

Signed-off-by: Scott Marlow <[email protected]>
…perty.Client2.transientTest that masks test failure

Signed-off-by: Scott Marlow <[email protected]>
…property.Client2.setup2 which should be called setup

Signed-off-by: Scott Marlow <[email protected]>
…a is not being called so rename it to setup

Signed-off-by: Scott Marlow <[email protected]>
…nce get/setter/fieldNames

Signed-off-by: Scott Marlow <[email protected]>
…ar name as jpa_core_EntityGraph_appmanaged_vehicles_client.jar

Signed-off-by: Scott Marlow <[email protected]>
…hemselves which is why tests ran so long. Also enable these tests again

Signed-off-by: Scott Marlow <[email protected]>
@@ -94,7 +94,7 @@ public Status run(String[] argv, Properties p) {
String className = this.getClass().getName();
// use this name for the context root or jndi name to eliminate
// naming conflicts for apps deployed at the same time
String sVehicleEarName = TestUtil.getProperty(p, "vehicle_ear_name");
// comment out unused: String sVehicleEarName = TestUtil.getProperty(p, "vehicle_ear_name");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could leave this in or remove it. If anyone finds they need the vehicle_ear_name property, we should add it back in.

@scottmarlow
Copy link
Contributor Author

scottmarlow commented Oct 4, 2024

Dear reviewers, please review the minor change to /common source. The jpa changes are still working in progress but good progress so far. I think that remaining work for appclient is mostly passing the tests that we already are passing (so mostly test changes needed to deal with setup/clean type logic).

I think we either need to execute the ddl/dml create scripts more often or we need to do less clean up as one problem with a few tests seemed to be caused by deleting the tables created by the /sql/derby scripts too soon (basically I could see a failure due to the table being missing that would of been created in those scripts). This is all minor at this point.

Just to share it here in case this is helpful for other changes, I fixed a deployment problem with the jpa appclient tests today by running script (see the commit from today with output):

function update_tests ()
{
  name=$1

    for updatefile in `find  -name "*$name*"`; do
        # echo "do something with file $updatefile"
        EAR_CLASS="$(grep "EnterpriseArchive.class" $updatefile | cut -d \" -f2 | cut -d'.' -f1)"
        sed "s%JavaArchive.class.*_client.jar%JavaArchive.class, \"${EAR_CLASS}_client.jar%" -i $updatefile
    done
}

# covers both AppmanagedTest + Appmanagednotx
update_tests "*Appmanaged*.java"
update_tests "*Stateful3Test*.java"
update_tests "*Stateless3Test*.java"

@scottmarlow scottmarlow merged commit c4291be into jakartaee:main Oct 6, 2024
1 of 2 checks passed
@scottmarlow scottmarlow deleted the derby.dml.sql_3 branch October 6, 2024 18:52
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.

2 participants