Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » No Matching Comparator error while using Eunit through Gradle
No Matching Comparator error while using Eunit through Gradle [message #1839130] Mon, 15 March 2021 12:58 Go to next message
Meredith Boyes is currently offline Meredith BoyesFriend
Messages: 1
Registered: March 2021
Junior Member
Hi,
I've been trying to run validation and testing through gitlab-ci by having the tests be run through Gradle and I've been encountering the following error:

Caused by: java.lang.IllegalArgumentException: No matching comparator has been found for org.eclipse.epsilon.eol.models.ReflectiveModelReference@7606e597 and org.eclipse.epsilon.eol.models.ReflectiveModelReference@5df24a3e

I'm fairly sure that my issue is just down to dependencies as I have no trouble running the eunit examples that are available directly through Eclipse Epsilon but I'm not sure which dependencies I'm missing to get it to work through Gradle. I've attached the file containing the full error message and a minimal example if it is of any help, and the version of epsilon I am using is defined in the build.gradle file as 2.3.0-SNAPSHOT. I have defined a gradle task for running the test named "testModel", so running "gradle testModel" while in the base directory should recreate the error.
Many thanks,
Meredith

Re: No Matching Comparator error while using Eunit through Gradle [message #1839314 is a reply to message #1839130] Fri, 19 March 2021 08:36 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2165
Registered: July 2009
Location: York, UK
Senior Member

Hi Meredith,

It seems that in EUnit, modelling-technology specific model comparators are contributed through an OSGi extension point, so they won't work properly in a non-OSGi environment. I can't think of an easy workaround for this I'm afraid.

Best,
Dimitris
Re: No Matching Comparator error while using Eunit through Gradle [message #1839320 is a reply to message #1839314] Fri, 19 March 2021 09:24 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

Hi Meredith,

Yes, as Dimitris says, the assertEqualModels built-in function right now relies on OSGi extension points, and we would need to make some improvements to allow for it to be used from non-OSGi environments.

I have filed this feature request in Bugzilla:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=572094

I hope to be able to look at this in a few days - please watch that issue :-).

Best,
Antonio
Re: No Matching Comparator error while using Eunit through Gradle [message #1839416 is a reply to message #1839320] Sat, 20 March 2021 15:30 Go to previous message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

Hi Meredith,

I have added support for using assertEqualModels from non-OSGi environments, as long as you do a bit of configuration :-). I have extended the standalone workflow example project with details of how to do this:

https://git.eclipse.org/c/epsilon/org.eclipse.epsilon.git/tree/examples/org.eclipse.epsilon.examples.workflow.standalone

Please check the provided examples and feel free to ask any questions!

Best,
Antonio
Previous Topic:Persisting Model repository over the boundary of the ant run
Next Topic:Broken link in Epsilon Hutn documentation
Goto Forum:
  


Current Time: Sat Apr 27 08:23:28 GMT 2024

Powered by FUDForum. Page generated in 0.03114 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top