Serge Huber created UNOMI-955:
---------------------------------

             Summary: Fix recurring CI failures and add local Javadoc 
validation to build script
                 Key: UNOMI-955
                 URL: https://issues.apache.org/jira/browse/UNOMI-955
             Project: Apache Unomi
          Issue Type: Sub-task
          Components: unomi(-core)
    Affects Versions: unomi-3.1.0
            Reporter: Serge Huber
            Assignee: Serge Huber
             Fix For: unomi-3.1.0


The master branch has several tests and build steps that fail regularly on CI, 
making it hard to know whether a real problem was introduced or if it is just a 
flaky test. This ticket addresses all of them at once, and also makes it easier 
to catch Javadoc problems before pushing to CI.

h2. Problems fixed

h3. 1. Tests that do not wait long enough

Some tests time out on a busy CI machine because their retry limits were set 
for a fast local machine. The affected tests are in the scheduler and the 
GraphQL integration suite.

h3. 2. Test cascade caused by shared state

When the scheduler service stops during a test, it leaves some tasks in a 
_running_ state in the shared in-memory storage. The next test that starts a 
service finds those tasks and fails because the state machine does not allow 
the required transition. This breaks three unrelated tests in a cascade:

* {{ProfileServiceImplTest}}
* {{SegmentServiceImplTest}}
* {{RulesServiceImplTest}}

h3. 3. Javadoc build failure

24 files in the router extension contain stray {{</p>}} closing tags in their 
Javadoc comments. The Java doclint tool rejects them because a block element 
like {{<ul>}} inside a {{<p>}} implicitly closes the paragraph, making the 
subsequent {{</p>}} unexpected. This breaks the nightly _Publish Javadoc_ CI 
job.

h3. 4. No way to catch Javadoc errors locally

The {{build.sh}} script has no option to run Javadoc validation, so 
contributors cannot catch these errors before pushing.

h2. Technical changes

|| File || Change ||
| {{SchedulerServiceImpl.preDestroy()}} | Mark all {{RUNNING}} tasks as 
{{CRASHED}} before releasing managers, so the next service instance can 
reschedule them via the valid {{CRASHED→SCHEDULED}} transition |
| {{SchedulerServiceImplTest}} | Increase {{TEST_TIMEOUT}} from 5 s to 15 s |
| {{GraphQLListIT.testCRUD}} | Increase {{keepTrying}} retries from 10 to 30 
for the async list membership step |
| 24 router-api and router-core files | Remove standalone {{* </p>}} lines from 
Javadoc blocks that end with {{</ul>}} |
| {{build.sh}} | Add {{\-\-javadoc}} flag (runs {{mvn javadoc:aggregate}}); 
{{\-\-ci}} now enables it automatically |



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to