ome / omero-server

Gradle project containing main server logic for OMERO
https://www.openmicroscopy.org/omero
GNU General Public License v2.0
5 stars 14 forks source link

Session bean actions should happen at `SYSTEM` priority #176

Closed chris-allan closed 8 months ago

chris-allan commented 8 months ago

Session bean actions should happen at SYSTEM priority so that long running user or background tasks cannot cause things like closeSession() to block for long periods of time. The Executor system thread pool is unbounded.

sbesson commented 8 months ago

@chris-allan

diff --git a/src/test/java/ome/server/utests/sessions/SessionBeanUnitTest.java b/src/test/java/ome/server/utests/sessions/SessionBeanUnitTest.java
index a39055eb..fdf8ee8f 100644
--- a/src/test/java/ome/server/utests/sessions/SessionBeanUnitTest.java
+++ b/src/test/java/ome/server/utests/sessions/SessionBeanUnitTest.java
@@ -111,7 +111,7 @@ public class SessionBeanUnitTest extends MockObjectTestCase {
         exMock.expects(once()).method("submit").will(new Stub(){

             public Object invoke(Invocation arg0) throws Throwable {
-                Callable callable = (Callable) arg0.parameterValues.get(0);
+                Callable callable = (Callable) arg0.parameterValues.get(1);
                 final Object rv = callable.call();
                 return new Future() {

should update the test to match the proposed implementation changes in SessionBean and fix the unit test failures.

chris-allan commented 8 months ago

Thanks, @sbesson.