WIP: bugfixes, machi_flu1_test still broken

This commit is contained in:
Scott Lystig Fritchie 2015-06-25 15:08:40 +09:00
parent d9407b76b7
commit 4fc0578a9d
4 changed files with 5 additions and 4 deletions

View file

@ -353,7 +353,7 @@ message Mpb_LL_ReadProjectionResp {
message Mpb_LL_WriteProjectionReq {
required Mpb_ProjType type = 1;
required Mpb_ProjectionV1 proj = 1;
required Mpb_ProjectionV1 proj = 2;
}
message Mpb_LL_WriteProjectionResp {

View file

@ -834,7 +834,8 @@ list_all_projections2(Sock, ProjType) ->
do_projection_common(Sock, Req) ->
erase(bad_sock),
try
ReqBin = machi_pb:encode_mpb_ll_request(Req),
ReqBin = list_to_binary(machi_pb:encode_mpb_ll_request(Req)),
io:format(user, "\nTrying: ~p\n", [machi_pb:decode_mpb_ll_request(ReqBin)]),
Len = iolist_size(ReqBin),
true = (Len =< ?MAX_CHUNK_SIZE),
LenHex = machi_util:int_to_hexbin(Len, 32),

View file

@ -149,7 +149,7 @@ make_projection_req(ID, {write_projection, ProjType, Proj}) ->
ProjM = conv_from_projection_v1(Proj),
#mpb_ll_request{req_id=ID,
proj_wp=#mpb_ll_writeprojectionreq{type=conv_from_type(ProjType),
proj=ProjM}};
proj=ProjM}};
make_projection_req(ID, {get_all_projections, ProjType}) ->
#mpb_ll_request{req_id=ID,
proj_ga=#mpb_ll_getallprojectionsreq{type=conv_from_type(ProjType)}};

View file

@ -173,7 +173,7 @@ flu_projection_smoke_test() ->
{ok, []} = ?FLU_C:list_all_projections(Host, TcpPort, T),
{ok, []} = ?FLU_C:get_all_projections(Host, TcpPort, T),
P_a = #p_srvr{name=a},
P_a = #p_srvr{name=a, port=4321},
P1 = machi_projection:new(1, a, [P_a], [], [a], [], []),
ok = ?FLU_C:write_projection(Host, TcpPort, T, P1),
{error, written} = ?FLU_C:write_projection(Host, TcpPort, T, P1),