-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
running ./run-test.sh fails eventually
$ ./run-test.sh
--- result 2021-05-04 14:39:18.545379451 +0200
+++ expected.result 2021-05-03 12:24:52.327669639 +0200
@@ -1,11 +1,11 @@
a:750
c:2500
c:5000
-b:750
+a:750
b:1250
c:2500
c:6000
-c:1000
+b:1000
a:750
c:500
c:1000
This is because both bidders b:750 and a:750 are bidding 750:
felipe@alreadytaken:~/workspace-idea/bidding-system-java$ curl -s "http://localhost:8080/4?a=5&b=3"; echo
a:750
felipe@alreadytaken:~/workspace-idea/bidding-system-java$ curl -s "http://localhost:8080/4?a=5&b=3"; echo
b:750
and the application takes the first. Check the logs:
2021-05-04 14:39:58.107 INFO 51455 --- [ parallel-3] BidResponse : request(256)
2021-05-04 14:39:58.111 INFO 51455 --- [r-http-epoll-10] BidResponse : onNext(BidResponse(id=4, bid=750, content=b:$price$))
2021-05-04 14:39:58.111 INFO 51455 --- [r-http-epoll-12] BidResponse : onNext(BidResponse(id=4, bid=750, content=a:$price$))
2021-05-04 14:39:58.111 INFO 51455 --- [r-http-epoll-11] BidResponse : onNext(BidResponse(id=4, bid=500, content=c:$price$))
2021-05-04 14:39:58.112 INFO 51455 --- [r-http-epoll-10] BidResponse : onComplete()
2021-05-04 14:39:58.112 INFO 51455 --- [r-http-epoll-12] BidResponse : onComplete()
2021-05-04 14:39:58.112 INFO 51455 --- [r-http-epoll-11] BidResponse : onComplete()
2021-05-04 14:40:00.250 INFO 51455 --- [or-http-epoll-5] o.g.f.b.a.handler.AuctionHandlerFunc : received bid request with adID: 4 attributes: {a=[5], b=[3]}
2021-05-04 14:40:00.250 INFO 51455 --- [ parallel-1] BidResponse : onSubscribe(FluxOnErrorResume.ResumeSubscriber)
2021-05-04 14:40:00.251 INFO 51455 --- [ parallel-1] BidResponse : request(256)
2021-05-04 14:40:00.251 INFO 51455 --- [ parallel-2] BidResponse : onSubscribe(FluxOnErrorResume.ResumeSubscriber)
2021-05-04 14:40:00.251 INFO 51455 --- [ parallel-2] BidResponse : request(256)
2021-05-04 14:40:00.251 INFO 51455 --- [ parallel-3] BidResponse : onSubscribe(FluxOnErrorResume.ResumeSubscriber)
2021-05-04 14:40:00.251 INFO 51455 --- [ parallel-3] BidResponse : request(256)
2021-05-04 14:40:00.254 INFO 51455 --- [r-http-epoll-12] BidResponse : onNext(BidResponse(id=4, bid=750, content=a:$price$))
2021-05-04 14:40:00.255 INFO 51455 --- [r-http-epoll-12] BidResponse : onComplete()
2021-05-04 14:40:00.255 INFO 51455 --- [r-http-epoll-10] BidResponse : onNext(BidResponse(id=4, bid=750, content=b:$price$))
2021-05-04 14:40:00.255 INFO 51455 --- [r-http-epoll-11] BidResponse : onNext(BidResponse(id=4, bid=500, content=c:$price$))
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request