Skip to content

Commit

Permalink
Update FakeTokbox.getSession to call a fake server.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rémy HUBSCHER committed Oct 6, 2014
1 parent a3f089f commit 858287a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
5 changes: 0 additions & 5 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@

## Questions

- Do we want to have a default value for some parameters on POST /rooms?
- What the default configuration should be, with hints from us.
- What should be the size of the room token? 8 Bytes for now.
- Should we dedupe the users in the room? (a participant per device or per account)
- Should everyone be able to list all the participants to a room, or should that be only for participants?
- How do we handle the link clicker session?
- How do we handle two participants asking for the same displayName?

Expand Down
2 changes: 1 addition & 1 deletion loadtests/config/test.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
hits = 1
users = 1
no-dns-resolve = true
include_file = ./loadtest/*.py
include_file = loadtest/*.py
11 changes: 9 additions & 2 deletions loop/tokbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,17 @@ FakeTokBox.prototype = {
getSession: function(options, cb) {
if (cb === undefined) {
cb = options;
options = undefined;
options = {};
}

cb(null, this._fakeSessionId(), {apiKey: this._fakeApiKey()});
var self = this;
// Do a real HTTP call to have a realistic behavior.
request.get({
url: self.serverURL,
timeout: options.timeout
}, function(err) {
cb(err, self._fakeSessionId(), {apiKey: self._fakeApiKey()});
});
},

getSessionToken: function() {
Expand Down

0 comments on commit 858287a

Please sign in to comment.