[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-active
Subject:    Re: Review Request 112965: add asset/forum/:assetId
From:       "Giorgos Tsiapaliokas" <terietor () gmail ! com>
Date:       2013-10-08 15:17:52
Message-ID: 20131008151752.21522.97009 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


-----------------------------------------------------------
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


[Attachment #5 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/112965/">http://git.reviewboard.kde.org/r/112965/</a>
  </td>
    </tr>
   </table>
   <br />




<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for Bodega.</div>
<div>By Giorgos Tsiapaliokas.</div>


<p style="color: grey;"><i>Updated Oct. 8, 2013, 3:17 p.m.</i></p>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Changes</h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">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.

</pre>
  </td>
 </tr>
</table>







<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
bodega-server
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Add a new route which returns the messages from the forum. The json \
looks like this

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


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
                break-word;">$ 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) \
&lt;------------------------------------------------------ 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)
</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> \
(updated)</h1> <ul style="margin-left: 3em; padding-left: 0;">

 <li>server/config.json.sample <span style="color: grey">(85b96d5)</span></li>

 <li>server/doc/bodega.json <span style="color: grey">(4efa14e)</span></li>

 <li>server/lib/db/forum.js <span style="color: grey">(d4dde01)</span></li>

 <li>server/lib/utils.js <span style="color: grey">(221e98e)</span></li>

 <li>server/test/forum.js <span style="color: grey">(PRE-CREATION)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/112965/diff/" style="margin-left: \
3em;">View Diff</a></p>







  </td>
 </tr>
</table>




  </div>
 </body>
</html>



_______________________________________________
Active mailing list
Active@kde.org
https://mail.kde.org/mailman/listinfo/active


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic