When jetty is part of the test feature (RestFeature, EmbeddedAutomationFeature ...) it can randomly put its own JNDI manager (mortbay) in place and raise error when looking for the transaction.
The test framework may be able to check the JNDI manager and output a warning that ask to add a jndi.properties to set explicitly the JNDI
Error that happens when jetty override the JDNI manager:
07:04:41,977 WARN [TransactionHelper] No user transaction javax.naming.NamingException: UserTransaction not found in JNDI at org.nuxeo.runtime.transaction.TransactionHelper.lookupUserTransaction(TransactionHelper.java:88) at org.nuxeo.runtime.transaction.TransactionHelper.commitOrRollbackTransaction(TransactionHelper.java:301)