Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
ddq-backend-tests
Advanced tools
Contains functional tests meant to be used by DDQ backend plugins. One example is DDQ MySQL Plugin.
ddqBackendTests.tests.deduplicationTest
ensures when a duplicate message is sent, it is not inserted and the original message is "requeued" and processed again.
ddqBackendTests.tests.mutlipleListenerTest
sets up multiple listeners and makes certain messages are not emitted to both listeners. It then requeues the message from the listener to first process the message, the second processor of the message then removes it.
ddqBackendTests.tests.wrappedMessageTest
is the more basic of these tests. It tests requeue, heartbeat, and remove. After heartbeat it ensures the heartbeat lifetime elapsed before the message is removed.
Add this package under devDependencies and use the module to run solitary tests or all at once.
var BackendTester, exit, tester;
exit = process.exit;
BackendTester = require("ddq-backend-tests")();
tester = new BackendTester();
tester.runAllTests((testErr) => {
if (testErr) {
console.error("Error occurred running DDQ backend functional tests.");
throw testErr;
}
console.log("Successfully ran backend plugin functional tests");
exit(0);
});
// For a single test.
tester.tests.wrappedMessageTest(() => {});
The test queue must be setup prior to running these tests. We wrote one plugin in MySQL and here is how we setup our test queue.
DROP DATABASE IF EXISTS testQueue;
CREATE DATABASE testQueue;
USE testQueue;
CREATE TABLE queue (
hash CHAR(64),
PRIMARY KEY(hash),
message VARCHAR(120) NOT NULL,
requeued BOOLEAN DEFAULT FALSE,
heartbeatDate DATETIME,
owner VARCHAR(256),
isProcessing BOOLEAN DEFAULT FALSE,
INDEX isProcessing(isProcessing),
topic VARCHAR(256),
messageBase64 VARCHAR(256)
);
The configuration that is used for functional tests can be found here.
FAQs
Tests for DDQ backend plugins.
The npm package ddq-backend-tests receives a total of 0 weekly downloads. As such, ddq-backend-tests popularity was classified as not popular.
We found that ddq-backend-tests demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.