Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Find a way to run the script above as an integration test against a real Magnolia instance. One idea could be registering a GroovyTestServlet which will get passed the script source and executes it. Then we assert that the output does not contain java.io.NotSerializableException.

I managed to get a working crafted this test https://git.magnolia-cms.com/projects/PLATFORM/repos/ce/compare/diff?targetBranch=refs%2Fheads%2Fmaster&sourceBranch=refs%2Fheads%2Fserialization-test&targetRepoId=545 but for some reason it does not seem to work in our integration tests environment, possibly due to the fact that no actual VaadinSession object is created (those tests are "headless") while the script works as expected when run against the magnoliaTest instance. 

The only Another way I see to check for serialization issues against an actual Magnolia instance seems to could be

  • startup Magnolia 
  • login
  • open some apps so to create a sort of real scenario (if you just login without opening apps, several UI classes won't be part of the session) 
  • stop Magnolia
  • restart Magnolia
  • scan logs for java.io.NotSerializableException

...