Review Request 112965: add asset/forum/:assetId

Giorgos Tsiapaliokas terietor at gmail.com
Tue Oct 8 15:17:52 UTC 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/112965/
-----------------------------------------------------------

(Updated Oct. 8, 2013, 3:17 p.m.)


Review request for Bodega.


Changes
-------

I have fixed all the issues except from the timeout issue.
I have put console.time everywhere in my code and all of
my code is being executed in a small amount of time(pretty much in
less than 10 ms) except from the requests. The requests take a lot
of time in order to be completed.


Repository: bodega-server


Description
-------

Add a new route which returns the messages from the forum.
The json looks like this

{
  "authStatus": true,
  "device": "KDE-1",
  "store": "KDE-1",
  "points": 10000,
  "success": true,
  "topics": [
    {
      "title": "Foo bar linux12342425",
      "message": "<p>foo bar linux123423235235235</p>"
    },
    {
      "title": "Foo bar linux123424566",
      "message": "<p>foo bar linux1234578896666</p>"
    },
    {
      "title": "Foo bar linux1234245",
      "message": "<p>foo bar linux12342245</p>"
    },
    {
      "title": "Foo bar linux1234",
      "message": "<p>foo bar linux1234566</p>"
    },
    {
      "title": "Foo bar ioanna maria 1foo bar ioanna maria 1adsasd",
      "message": "<p>88971238912389()(<em>()DAS</em>()A*(DS()<em>ADS(</em>()ADS908foo bar ioanna maria 1foo bar ioanna maria 1foo bar ioanna maria 1foo bar ioanna maria 1</p>"
    }
  ]
}


Diffs (updated)
-----

  server/config.json.sample 85b96d5 
  server/doc/bodega.json 4efa14e 
  server/lib/db/forum.js d4dde01 
  server/lib/utils.js 221e98e 
  server/test/forum.js PRE-CREATION 

Diff: http://git.reviewboard.kde.org/r/112965/diff/


Testing
-------

$ make test/forum
./node_modules/.bin/mocha test/forum.js --reporter spec
WARNING: Setting up server with no ssl!
Bodega server listening on localhost:3001 in devel mode


  Forum
    Authorization
      ? succeeds (75ms)
    List Messages
      ? should fail because the asset is invalid 
      ? should succeed (3313ms) <------------------------------------------------------ Probably something is wrong here. It takes 3 seconds and both bodega-server and the forum are in localhost.
                                                                                        I did this.timeout(15000) in order to pass the test

  3 passing (3 seconds)


Thanks,

Giorgos Tsiapaliokas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/active/attachments/20131008/7a78ae89/attachment.html>


More information about the Active mailing list