Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jmrunge/tests #141

Open
wants to merge 93 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
5a83cad
add back mosto status test
Lacrymology Sep 11, 2013
a90da87
logging
Lacrymology Sep 11, 2013
aa691d1
whitespace
Lacrymology Sep 11, 2013
a35e36c
return models tests
Lacrymology Sep 11, 2013
8244ae2
getWindow doesn't exist anymore
Lacrymology Sep 11, 2013
21e9f62
fix 'should responde to create messages' test for new format
Lacrymology Oct 7, 2013
a1cef11
use new commands
Lacrymology Oct 7, 2013
8ce59db
fix blank clip name
Lacrymology Oct 7, 2013
20f7cf3
add functional test back
Lacrymology Oct 7, 2013
868fdd4
require only the... required.. driver
Lacrymology Oct 9, 2013
49d8127
fix helper functions for new models
Lacrymology Oct 9, 2013
bd1e4b3
there's no more 'promisedCommand' methods
Lacrymology Oct 9, 2013
8d734d8
the telltale string changed
Lacrymology Oct 9, 2013
34e11fa
call done(), make sure we pass no arguments
Lacrymology Oct 9, 2013
e69ea19
is_synced receives the time
Lacrymology Oct 9, 2013
ae457f9
better logging on mongo driver
Lacrymology Oct 9, 2013
55a52bb
listen on status change on pub/sub instead of on mosto events
Lacrymology Oct 9, 2013
a379797
remove dead code
Lacrymology Oct 9, 2013
c39096c
make sure to use safe:true in inserts
Lacrymology Oct 11, 2013
d9b45a8
skip 'start with playlists'
Lacrymology Oct 11, 2013
7c4ac09
Took out semaphore from api/Melted
jmrunge Nov 28, 2013
7f30e5f
Modified mosto core to stop using melted semaphore
jmrunge Nov 28, 2013
6f15d7e
Added test helper with semaphore and init+finish code for each test
jmrunge Nov 28, 2013
5a1ce31
Added init and finish calls to helper to functional test
jmrunge Nov 28, 2013
26a46b3
Replaced melted take with helper init and finish calls in heartbeats …
jmrunge Nov 28, 2013
471a597
Replaced melted take with init and finish calls to helper in models test
jmrunge Nov 28, 2013
2a106eb
Replaced melted take with init and finish calls to helper in status test
jmrunge Nov 28, 2013
6708361
Replaced melted take with helper init and finish calls in mvcp driver…
jmrunge Nov 28, 2013
f53c36f
Replaced melted take with init and finish calls to helper in mongo test
jmrunge Nov 28, 2013
db52a33
Added pubsub the option to receive custom config to set up db
jmrunge Nov 28, 2013
3bd3c4e
Removed unused dependency
jmrunge Nov 28, 2013
1872042
Added logging
jmrunge Nov 28, 2013
23f7424
Added Models the option to send arguments to MeltedCollection.set via…
jmrunge Nov 28, 2013
81be75e
Added mosto core the option to receive custom db config and pass it t…
jmrunge Nov 28, 2013
5b02da4
Logging
jmrunge Nov 28, 2013
c79e609
Incremented finish timeout in mosto core
jmrunge Nov 28, 2013
0518d23
Added logger to melted-node in functional test so it starts respectin…
jmrunge Nov 28, 2013
7f45f61
Set mongo config to mosto so it sends it to mongo driver and pubsub
jmrunge Nov 28, 2013
24bcc01
Removed skip from functional test start with playlists
jmrunge Nov 28, 2013
6aac1f7
Wait for BLANK file in listener before continuing with the test
jmrunge Nov 28, 2013
7edbfa5
Added helper function to get medias as JSON
jmrunge Nov 28, 2013
66f8168
Changed the way of creating pieces (using JSON instead of Media.Model…
jmrunge Nov 28, 2013
4d176dc
Added LOG_LEVEL to npm test (used by travis) because it claims log be…
jmrunge Nov 28, 2013
3606541
Incremented timout on mosto finish due travis errors
jmrunge Nov 28, 2013
45282be
Unsuscribe from events after receive the one needed
jmrunge Nov 28, 2013
3a20c47
Removed node 0.8 from travis config
jmrunge Dec 2, 2013
65816d3
add back mosto status test
Lacrymology Sep 11, 2013
34392da
logging
Lacrymology Sep 11, 2013
1033d94
whitespace
Lacrymology Sep 11, 2013
a9513ba
return models tests
Lacrymology Sep 11, 2013
57a0ffd
getWindow doesn't exist anymore
Lacrymology Sep 11, 2013
8f8b5e2
fix 'should responde to create messages' test for new format
Lacrymology Oct 7, 2013
963dfdb
use new commands
Lacrymology Oct 7, 2013
d927cc6
fix blank clip name
Lacrymology Oct 7, 2013
2c92091
add functional test back
Lacrymology Oct 7, 2013
f06ed20
require only the... required.. driver
Lacrymology Oct 9, 2013
bce61c2
fix helper functions for new models
Lacrymology Oct 9, 2013
6602e51
there's no more 'promisedCommand' methods
Lacrymology Oct 9, 2013
6d67320
the telltale string changed
Lacrymology Oct 9, 2013
60ef578
call done(), make sure we pass no arguments
Lacrymology Oct 9, 2013
0e06264
is_synced receives the time
Lacrymology Oct 9, 2013
c821b30
better logging on mongo driver
Lacrymology Oct 9, 2013
345fbb8
listen on status change on pub/sub instead of on mosto events
Lacrymology Oct 9, 2013
01162ef
remove dead code
Lacrymology Oct 9, 2013
1150e1e
make sure to use safe:true in inserts
Lacrymology Oct 11, 2013
a9f6b1c
skip 'start with playlists'
Lacrymology Oct 11, 2013
39e9de1
Took out semaphore from api/Melted
jmrunge Nov 28, 2013
e830f57
Modified mosto core to stop using melted semaphore
jmrunge Nov 28, 2013
4311041
Added test helper with semaphore and init+finish code for each test
jmrunge Nov 28, 2013
3ba0000
Added init and finish calls to helper to functional test
jmrunge Nov 28, 2013
780de35
Replaced melted take with helper init and finish calls in heartbeats …
jmrunge Nov 28, 2013
8038ef6
Replaced melted take with init and finish calls to helper in models test
jmrunge Nov 28, 2013
0114426
Replaced melted take with init and finish calls to helper in status test
jmrunge Nov 28, 2013
e849fc2
Replaced melted take with helper init and finish calls in mvcp driver…
jmrunge Nov 28, 2013
7709819
Replaced melted take with init and finish calls to helper in mongo test
jmrunge Nov 28, 2013
1cd837e
Added pubsub the option to receive custom config to set up db
jmrunge Nov 28, 2013
2c88034
Removed unused dependency
jmrunge Nov 28, 2013
170c741
Added logging
jmrunge Nov 28, 2013
2e3698e
Added Models the option to send arguments to MeltedCollection.set via…
jmrunge Nov 28, 2013
e6f2ca0
Added mosto core the option to receive custom db config and pass it t…
jmrunge Nov 28, 2013
fde836d
Logging
jmrunge Nov 28, 2013
8507fb0
Incremented finish timeout in mosto core
jmrunge Nov 28, 2013
733866b
Added logger to melted-node in functional test so it starts respectin…
jmrunge Nov 28, 2013
6efb4c3
Set mongo config to mosto so it sends it to mongo driver and pubsub
jmrunge Nov 28, 2013
cc06dc6
Removed skip from functional test start with playlists
jmrunge Nov 28, 2013
46a7043
Wait for BLANK file in listener before continuing with the test
jmrunge Nov 28, 2013
e6ed1fa
Added helper function to get medias as JSON
jmrunge Nov 28, 2013
dd4a849
Changed the way of creating pieces (using JSON instead of Media.Model…
jmrunge Nov 28, 2013
2bd4a6b
Added LOG_LEVEL to npm test (used by travis) because it claims log be…
jmrunge Nov 28, 2013
c1279e5
Incremented timout on mosto finish due travis errors
jmrunge Nov 28, 2013
7a83fbc
Unsuscribe from events after receive the one needed
jmrunge Nov 28, 2013
4263243
Merge branch 'jmrunge/tests' of https://github.com/inaes-tic/mbc-most…
jmrunge Dec 2, 2013
5ab5457
Incremented timeout to check for Melted because it was to tight for n…
jmrunge Dec 2, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Incremented timeout to check for Melted because it was to tight for n…
…ode.js

Signed-off-by: Juan Martin Runge <jmrunge@gmail.com>
  • Loading branch information
jmrunge committed Dec 2, 2013
commit 5ab5457d667cf8bd6c93572ebcc25f32c4dc232b
7 changes: 5 additions & 2 deletions mosto.js
Original file line number Diff line number Diff line change
@@ -254,7 +254,8 @@ mosto.prototype.init = function(melted, callback) {
};

mosto.prototype.scheduleMeltedCheck = function() {
this.meltedInterval = setTimeout(this.checkMelted.bind(this, this.scheduleMeltedCheck.bind(this), true), 100);
this.meltedInterval = setTimeout(this.checkMelted.bind(this, this.scheduleMeltedCheck.bind(this), true), 500);
logger.debug("Melted Timeout id:", this.meltedInterval);
};

mosto.prototype.checkMelted = function(callback, forceLoad) {
@@ -281,8 +282,10 @@ mosto.prototype.checkMelted = function(callback, forceLoad) {
mosto.prototype.finish = function(callback) {
var self = this;
logger.info("mbc-mosto: [INFO] Finish mbc-mosto... ");
if (self.restartMelted)
if (self.restartMelted) {
logger.debug("Clearing Melted Timeout id:", self.meltedInterval);
clearTimeout(self.meltedInterval);
}
this.stopDriver();
this.playlists.get("melted_medias").write.take(function() {
logger.debug("[finish] stop melted_medias mvcp server");