linagora/james-gatling

[BUILD] James-gatling build on master is failing

quantranhong1999 opened this issue · 2 comments

james-gatling build on master is failing.
rf: https://james-jenkins.open-paas.org/blue/organizations/jenkins/James%20Gatling%20build/detail/master/90/pipeline

Investigate this:

[error] Failed tests:

[error] 	org.apache.james.gatling.jmap.rfc8621.WebsocketSimpleIT

[error] (Gatling-it / test) sbt.TestsFailedException: Tests unsuccessful

[error] Total time: 1300 s (21:40), completed Dec 9, 2022, 2:59:08 PM

BTW this build has failed for 12 days and no one knows, we should consider alerting fail builds for james-gatling and gatling-imap IMO.

So the root cause is on James side. Now James response 2 stateChange upon Mailbox/set instead of 1 as before (as james-gatling' WebsocketSimpleScenario assertion).

With websocket requests:

ws.send(WebSocketFrame.text(
              """{
                |  "@type": "WebSocketPushEnable",
                |  "dataTypes": ["Mailbox", "Email"]
                |}""".stripMargin))

            Thread.sleep(100)

            ws.send(WebSocketFrame.text(
              s"""{
                 |	"@type": "Request",
                 |	"id": "req-36",
                 |	"using": ["urn:ietf:params:jmap:core", "urn:ietf:params:jmap:mail"],
                 |	"methodCalls": [
                 |		[
                 |			"Mailbox/set",
                 |			{
                 |				"accountId": "$ACCOUNT_ID",
                 |				"create": {
                 |					"C42": {
                 |						"name": "myMailbox"
                 |					}
                 |				}
                 |			},
                 |			"c1"
                 |		]
                 |	]
                 |}""".stripMargin))

We get 3 responses:

{"@type":"StateChange","changed":{"29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6":{"Mailbox":"85b5dd99-575c-4ca7-b9e2-541c0cce1c0d"}},"pushState":"88fd31557cb7e28f908d37410fb5355e23fe176e88f7236673f34731155004e1"}
{"@type":"StateChange","changed":{"29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6":{"Mailbox":"c693b5d3-2a0b-456f-8f13-75a99fa80dec"}},"pushState":"cc1002b3fcaafe9b5ae312a69d84ea46fa95d8385b7fb84a47c5a6db0f31b7df"}
{"@type":"Response","requestId":"req-36","sessionState":"2c9f1b12-b35a-43e6-9af2-0106fb53a943","methodResponses":[["Mailbox/set",{"accountId":"29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6","oldState":"2c9f1b12-b35a-43e6-9af2-0106fb53a943","created":{"C42":{"totalThreads":0,"isSubscribed":true,"totalEmails":0,"unreadThreads":0,"unreadEmails":0,"sortOrder":1000,"myRights":{"mayReadItems":true,"mayAddItems":true,"mayRemoveItems":true,"maySetSeen":true,"maySetKeywords":true,"mayCreateChild":true,"mayRename":true,"mayDelete":true,"maySubmit":true},"id":"1"}},"newState":"c693b5d3-2a0b-456f-8f13-75a99fa80dec"},"c1"]]}

I am not sure if two StateChange regarding Mailbox here are intended (would investigate), otherwise, the fix on james-gatling is trivial.

Green build: #156