opennars / Narjure

A Clojure implementation of the Non-Axiomatic Reasoning System proposed by Pei Wang.
GNU General Public License v2.0
44 stars 11 forks source link

Actor Tests #11

Closed 0xc1c4da closed 8 years ago

0xc1c4da commented 8 years ago

We need to find a way to test the individual actors message I/O

0xc1c4da commented 8 years ago

https://github.com/puniverse/pulsar/blob/master/src/test/clojure/co/paralleluniverse/pulsar/actors_test.clj

marotili commented 8 years ago

The actors have a lot of duplicate code regarding message handling, initialization and shutdown. I saw that the defactor macro already exists, but it is unused.

Are there any plans to abstract the individual actors, so that the message handling can be tested only once? (Maybe add message specifications?) Then the messaging can be tested once, and each actor can have tests specific to them.

See #22 for basic actor tests for the task-creator.

patham9 commented 8 years ago

Might be relevant in in the future: https://github.com/mfpi/opennars2/blob/56263948d39666bfbe3afc98d04016ddf6affcb8/src/narjure/actor/test_utils.clj

patham9 commented 8 years ago

Lense is effectively what replaced actor-tests for us and made finding issues in a constantly changing design as we had in the development process easy without any maintenance cost when changes happened. As the design for the 2.0.x versions is stable actor tests could now be added, however they are now unnecessary as the actors work perfectly, thus closed.