Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-2079

optimistic locking test

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • None
    • None
    • None

      create a minimal test that produces an optimistic locking failure.

      I believe the simplest way to test this is something like this:

      Start a process instance with 2 wait states and put it in the first wait state.

      EnvironmentFactory environmentFactory = get it from some configuration file

      Environment environment1 = environmentFactory.openEnvironment();
      Session session1 = environment1.get(Session.class);
      ExecutionImpl processInstance1 = session1.load(ExecutionImpl.class, processInstanceDbid);

      Environment environment2 = environmentFactory.openEnvironment();
      Session session2 = environment2.get(Session.class);
      ExecutionImpl processInstance2 = session2.load(ExecutionImpl.class, processInstanceDbid);

      processInstance1.signal();
      processInstance2.signal();

      environment2.close();
      environment1.close();

              Unassigned Unassigned
              tom.baeyens Tom Baeyens (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: