Feature #679

Write server_journal class

Added by David Demelier 11 months ago. Updated 10 months ago.

Status:ClosedStart date:08/16/2017
Priority:NormalDue date:
Assignee:David Demelier% Done:

100%

Category:TestsEstimated time:4.00 h
Target version:3.0.0
MFD after: Bookmark:@
MFD revision: Submitted by:
Branch:default

Description

For the moment, all tests reimplement a subclass for server and are catch the arguments.

Implement to_json for each event

Example

class message_event {
public:
    nlohmann::json to_json() const
    {
        return {
            { "event", "message" },
            { "server", "xyz" }
        };
    }
};

Implement a journaled server

Create an inherited class for server whose all commands / events are logged into a dedicated queue.

  • std::queue<nlohmann::json> commands_;
  • std::queue<nlohmann::json> events_;

Associated revisions

Revision 489:b3aabdae2353
Added by David Demelier 11 months ago

Tests: add journal_server, closes #679

History

#1 Updated by David Demelier 11 months ago

  • Description updated (diff)

#2 Updated by David Demelier 10 months ago

  • % Done changed from 0 to 100
  • Status changed from New to Resolved

#3 Updated by David Demelier 10 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF