Feature #679

Write server_journal class

Added by David Demelier over 1 year ago. Updated about 1 year 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: Branch:default
MFD revision: Bookmark:@

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 about 1 year ago

Tests: add journal_server, closes #679

History

#1 Updated by David Demelier over 1 year ago

  • Description updated (diff)

#2 Updated by David Demelier about 1 year ago

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

#3 Updated by David Demelier about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF