Blueprint-uServices / blueprint

Blueprint Microservices Compiler: Flexible and Configurable Open-Source Microservice Benchmark Applications
https://blueprint-uservices.github.io
BSD 3-Clause "New" or "Revised" License
21 stars 5 forks source link

Unable to invoke application #167

Closed alansong21 closed 7 months ago

alansong21 commented 8 months ago

After following the instructions in https://github.com/Blueprint-uServices/blueprint/tree/main/examples/sockshop, I compiled and ran the application. However, when I try to invoke using the following command (as stated in the docs): curl http://localhost:12356/ListItems?pageSize=100\&pageNum=1 I got this message: It looks like you are trying to access MongoDB over HTTP on the native driver port.

Also, I tried testing the compiled application using

cd ./build
set -a
. ./.local.env
cd gotests/tests
go test .

but I got the error:

--- FAIL: TestAll (0.00s)
    userservice_test.go:110: 
                Error Trace:    /users/als2005/blueprint/examples/sockshop/build/gotests/tests/userservice_test.go:110
                Error:          "[{firstn lastn my@email jon df39e57c36e05013cace8c793237c956602cc33a [{     65ed1d0bc76618b25ff84a18}] [{   65ed1d0bc76618b25ff84a19}] 65ed1d0bc76618b25ff84a17 8da31c0c3bb92b7220077a28e230292bef41b179}]" should have 0 item(s), but has 1
                Test:           TestAll
FAIL
FAIL    github.com/blueprint-uservices/blueprint/examples/sockshop/tests        1.995s
FAIL

Any idea what's going on here? I have gRPC and Docker both installed -- am I potentially missing any prerequisites?

vaastav commented 7 months ago

Hi @alansong21 , my apologies for not getting to this sooner! I think there were some minor bugs that I have recently fixed for the sockshop application. Could you please try the latest commit and let me know if things aren't working?

The first error that you see is probably because the address of the frontend server is not at 12356 but at a different port as we modified the port-binding to be automated.

The tests had a minor bug caused due to json serialization which was recently fixed. Additionally, running the test suite more than once might cause test failures as the tests may not necessarily fully reset the state of the various backends.

alansong21 commented 7 months ago

Seems to be working now, thanks!

vaastav commented 7 months ago

Fixed as of #168