OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-cogserver commits / 4ab77e3

Crude hackery to avoid timeouts in build machine
4ab77e3f5de15dac495b074b00cf9a403596f851
by Linas Vepštas <linasvepstas@gmail.com> · 2025-12-17T04:20:00.000Z

Changed files (2) +8 -5

tests/shell/JsonShellUTest.cxxtest +6 -4
……@@ -166,8 +166,9 @@ public:
166166 usleep(50000);
167167
168168 // Get all ConceptNodes via JSON shell
169 // -q3 because the guix test environment is slow as molasses
169170 std::string result = json_cmd_exec(
170 "echo 'json\\nAtomSpace.getAtoms(\"ConceptNode\")\\n' | nc -q 1 localhost 17335");
171 "echo 'json\\nAtomSpace.getAtoms(\"ConceptNode\")\\n' | nc -q 3 localhost 17335");
171172
172173 TS_ASSERT(result.find("json-test-1") != std::string::npos);
173174 TS_ASSERT(result.find("json-test-2") != std::string::npos);
……@@ -180,17 +181,18 @@ public:
180181 logger().debug("BEGIN TEST: %s", __FUNCTION__);
181182
182183 // Create a new atom via JSON command
184 // -q3 because the guix test environment is slow as molasses
183185 std::string result = json_cmd_exec(
184 "echo 'json\\nAtomSpace.makeAtom({\"type\": \"Concept\", \"name\": \"json-created\"})\\n' | nc -q 1 localhost 17335");
186 "echo 'json\\nAtomSpace.makeAtom({\"type\": \"Concept\", \"name\": \"json-created\"})\\n' | nc -q 3 localhost 17335");
185187
186188 TS_ASSERT(result.find("true") != std::string::npos);
187189
188190 // Verify the atom was created by checking with haveNode
189191 std::string verify = json_cmd_exec(
190 "echo 'json\\nAtomSpace.haveNode(\"Concept\", \"json-created\")\\n' | nc -q 1 localhost 17335");
192 "echo 'json\\nAtomSpace.haveNode(\"Concept\", \"json-created\")\\n' | nc -q 3 localhost 17335");
191193
192194 TS_ASSERT(verify.find("true") != std::string::npos);
193195
194196 logger().debug("END TEST: %s", __FUNCTION__);
195197 }
196};
198};
tests/shell/McpShellUTest.cxxtest +2 -1
……@@ -186,10 +186,11 @@ public:
186186 usleep(50000);
187187
188188 // Now use MCP shell to query for the atom
189 // -q3 because the guix test environment is slow as molasses.
189190 std::string result = mcp_cmd_exec(
190191 "echo 'mcp\\n{\"jsonrpc\": \"2.0\", \"method\": \"tools/call\", "
191192 "\"params\": {\"name\": \"getAtoms\", \"arguments\": {\"type\": \"ConceptNode\"}}, "
192 "\"id\": 1}\\n' | nc -q 1 localhost 17334");
193 "\"id\": 1}\\n' | nc -q 3 localhost 17334");
193194
194195 TS_ASSERT(result.size() > 0);
195196 TS_ASSERT(result.find("mcp-test-concept") != std::string::npos);