Example
Example copied to clipboard
Client tests
Update client test
@tshemsedinov Perhaps partially. Maybe it will be better if @leonpolak looks at whether everything is present, what he expected. I did not look at PR #204, but just corrected what interfered with the work of the test. PS: I gave access to changes to my Fork.
Looks like redis can't be accessed in docker: unhandledRejection: Error: connect ECONNREFUSED 127.0.0.1:6379
@MarhiievHE
Looks like redis can't be accessed in docker:
unhandledRejection: Error: connect ECONNREFUSED 127.0.0.1:6379
@MarhiievHE
You are right, I have forgotten to add optional support running API under a container with Redis. Ok, I will add a config for Redis.
@tshemsedinov Do you have any other suggestions to improve or add some more tests?
@tshemsedinov Do you have any other suggestions to improve or add some more tests?
Tests are still failing https://github.com/metarhia/Example/pull/225/checks
@tshemsedinov Do you have any other suggestions to improve or add some more tests?
Tests are still failing https://github.com/metarhia/Example/pull/225/checks
It's because the test.yml haven't any instance of Redis in the test environment.
Please rebase on master
Sorry for such a massive delay in the review. Everything works and all required tests pass (Huge respect to Heorhii and Timur). Just 3 questions:
- Where is uploaded content stored?
- Is 'example/subscribe' should work like this? Shouldn't it listen indefinitely for server-side events, until some 'unsubscribe' call?
- I get 'warning: MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [MetaReadable]'. I obviously can use emitter.setMaxListeners(11), but it does not feel right.
You're welcome.
- There are two examples of file upload. The first through the Metacom stream saves to the path /application/resources/. The second through serialization, saves to the path application/tmp/.
- I agree will be well expanding the algorithm.
- Perhaps this version of the code refers to an old Metacom not yet been corrected. It will be necessary to apply changes from the master and see if the problem remains.
PS: I was a little busy in August, I was preparing for a language exam, and now I want to return to rewriting the Metatest library on the node test runner. But on Thursday, I plan to be on the community call and it will be possible to discuss what is not enough to close this PR.
@leonpolak @tshemsedinov I rewrote the test to use a node test runner and fixed a subscription check. And I also corrected the GitHub Actions script. Now, all tests are completed correctly.
@leonpolak Did you talk about this error before? I caught it too now with node version 18.
19:59:09 W2 error warning: MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 Symbol() listeners added to [MetaReadable]. Use emitter.setMaxListeners() to increase limit
_addListener (node:events:587:17)
MetaReadable.addListener (node:events:605:10)
MetaReadable.once (node:events:649:8)
eventTargetAgnosticAddListener (node:events:1004:15)
node:events:966:5
new Promise (<anonymous>)
Function.once (node:events:949:10)
MetaReadable.push (/node_modules/metacom/lib/streams.js:45:26)
Server.binary (/node_modules/metacom/lib/server.js:300:18)