Skip to content
This repository has been archived by the owner on Mar 7, 2021. It is now read-only.

Commit

Permalink
Adjusted slow time for tests
Browse files Browse the repository at this point in the history
Now that the testserves responds more slowly (to better simulate
real conditions), we need to adjust the mocha tests' slow times
accordingly.
  • Loading branch information
fredrikekelund committed Jul 17, 2016
1 parent 2144cc0 commit 26b7c67
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/depth.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ var depthTest = function(depth, linksToDiscover, behaviour) {
};

describe("Crawler max depth with resource override (old default behaviour)", function() {
this.slow("300ms");

// depth: linksToDiscover
var linksToDiscover = {
Expand All @@ -75,6 +76,8 @@ describe("Crawler max depth with resource override (old default behaviour)", fun
});

describe("Crawler max depth without fetching resources (new default behaviour)", function() {
this.slow("300ms");

// depth: linksToDiscover
var linksToDiscover = {
0: 11, // links for depth 0
Expand Down
2 changes: 2 additions & 0 deletions test/reliability.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ var should = chai.should();

// Runs a very simple crawl on an HTTP server
describe("Crawler reliability", function() {
this.slow("600ms");

var Crawler = require("../");

Expand Down Expand Up @@ -51,6 +52,7 @@ describe("Crawler reliability", function() {
var localCrawler = new Crawler("http://127.0.0.1:3000/");
localCrawler.downloadUnsupported = false;
localCrawler.maxConcurrency = 1;
localCrawler.discoverResources = false;

localCrawler.queueURL("http://127.0.0.1:3000/img/1");
localCrawler.queueURL("http://127.0.0.1:3000/img/2");
Expand Down
1 change: 1 addition & 0 deletions test/testcrawl.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ var makeCrawler = function (url) {
};

describe("Test Crawl", function() {
this.slow("200ms");

it("should be able to be started", function(done) {
var crawler = makeCrawler("http://127.0.0.1:3000/");
Expand Down

0 comments on commit 26b7c67

Please sign in to comment.