Skip to content

Commit

Permalink
slinted
Browse files Browse the repository at this point in the history
  • Loading branch information
romanatarango committed Jul 1, 2022
1 parent e3b1756 commit 5cb8efa
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 20 deletions.
2 changes: 1 addition & 1 deletion js/common/modules/@arangodb/graph/graphs-generation.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ const graphGenerator = function (verticesEdgesGenerator) {
makeBidirectedClique,
makePath
};
}
};

const makeEdgeBetweenVertices = function(vColl, from, fromLabel, to, toLabel) {
return {
Expand Down
18 changes: 1 addition & 17 deletions js/common/modules/@arangodb/graph/pregel-test-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,22 +174,6 @@ const testComponentsAlgorithmOnDisjointComponents = function (componentGenerator
}
};

/**
* A wrapper for testComponentsAlgorithmOnDisjointComponents. If the latter gets the same generators and the parameter
* is only "length", pass the sizes, the generator and the algorithm name.
* @param sizes An array of sizes of the resulting components.
* @param generator The generator function.
* @param algorithmName The algorithm name.
*/
const testComponentsAlgorithmOnDisjointComponentsSameKind = function (sizes, generator, algorithmName = "wcc") {
console.warn(generator);
let componentGenerators = [];
for (const i of sizes) {
componentGenerators.push(new ComponentGenerator(generator, {length: i}));
}
testComponentsAlgorithmOnDisjointComponents(componentGenerators, algorithmName);
};

function makeWCCTestSuite(isSmart, smartAttribute, numberOfShards) {

const {makeEdgeBetweenVertices, verticesEdgesGenerator} = loadGraphGenerators(isSmart);
Expand Down Expand Up @@ -321,7 +305,7 @@ function makeWCCTestSuite(isSmart, smartAttribute, numberOfShards) {
db[vColl].save(vertices);
db[eColl].save(edges);

const computedComponents = pregelRunSmallInstance("wcc", graphName, {resultField: "result", store: true})
const computedComponents = pregelRunSmallInstance("wcc", graphName, {resultField: "result", store: true});
assertEqual(computedComponents.length, 1, `We expected 1 component, instead got ${JSON.stringify(computedComponents)}`);

assertEqual(computedComponents[0].size, Math.pow(2, depth + 1) - 1); // number of vertices in a full binary tree
Expand Down
1 change: 0 additions & 1 deletion tests/js/common/shell/shell-pregel-components-nightly.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/*jshint globalstrict:false, strict:false */
/*global assertEqual, assertTrue, assertNotEqual, JSON */
'use strict';

// //////////////////////////////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion tests/js/common/shell/shell-pregel-components.js
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,6 @@ const sccTestSuite = pregelTestHelpers.makeSCCTestSuite(false, "", 4);

jsunity.run(componentsTestSuite);
jsunity.run(wccRegressionTestSuite);
//jsunity.run(wccTestSuite);
jsunity.run(wccTestSuite);
jsunity.run(sccTestSuite);
return jsunity.done();

0 comments on commit 5cb8efa

Please sign in to comment.