eiffel-community / eiffel-intelligence

Eiffel Intelligence is a real time data aggregation and analysis solution for Eiffel events.
Apache License 2.0
11 stars 72 forks source link

Test rules functionality is unstable #445

Closed Christoffer-Cortes closed 4 years ago

Christoffer-Cortes commented 4 years ago

Description

There seems to be faulty logic in the test rules functionality. If there are more events than there are rules it will not aggregate. More events causes a json index issue.

Motivation

The test rules functionality does not currently work as expected.

Exemplification

2020-02-18 15:47:48.234 ERROR 27304 --- [nio-8090-exec-4] c.e.e.controller.RuleTestControllerImpl  : Internal Server Error: Failed to generate aggregated object.

org.json.JSONException: JSONArray[7] not found.
at org.json.JSONArray.get(JSONArray.java:218) ~[json-20180130.jar:na]
at org.json.JSONArray.getJSONObject(JSONArray.java:423) ~[json-20180130.jar:na]
at com.ericsson.ei.services.RuleCheckService.prepareAggregatedObject(RuleCheckService.java:45) ~[classes/:na]
at com.ericsson.ei.controller.RuleTestControllerImpl.createRuleTestRunFullAggregation(RuleTestControllerImpl.java:90) ~[classes/:na]
at com.ericsson.ei.controller.RuleTestControllerImpl$$FastClassBySpringCGLIB$$8aca890d.invoke(<generated>) [classes/:na]

Benefits

A working test rules page.

Possible Drawbacks

None.