Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JT400 tests can not be run in parallel #6018 #6019

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

JiriOndrusek
Copy link
Contributor

@JiriOndrusek JiriOndrusek commented Apr 22, 2024

fixes #6018

Better locking mechanism is iused.

1 file for locking has to be provided in the integrated file system. Each execution then asks for the lock of that file using JTOpen API.
Instruction of how to create such file are added into the readme.adoc.

Investigation of parallel executions revealed, that there might be a problem in jt400 regarding release of the connections.
Even if the route

from("jt400://username:password@localhost/qsys.lib/qusrsys.lib/myq.msgq?sendingReply=true")
.choice()
    .when(header(Jt400Constants.MESSAGE_TYPE).isEqualTo(AS400Message.INQUIRY))
        .process((exchange) -> {
            String reply = // insert reply logic here
            exchange.getIn().setBody(reply);
        })
        .to("jt400://username:password@localhost/qsys.lib/qusrsys.lib/myq.msgq");

is stopped, access to the queue is still blocked (about 20-30 seconds) and throws CPF2451 Message queue REPLYMSGQ is allocated to another job.

Therefore I'm adding a clear of the queues to the @BeforeAll method with await to wait for the lock to go away.
(Until a proper fix is implemented)

@jamesnetherton jamesnetherton merged commit d5334ad into apache:main Apr 23, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JT400 tests can not be run in parallel
3 participants