Skip to content
Snippets Groups Projects
Commit 55cda9bf authored by Richard T. Carback III's avatar Richard T. Carback III
Browse files

fix message partitioner test errors

parent cc3a7b23
No related branches found
No related tags found
3 merge requests!510Release,!226WIP: Api2.0,!207WIP: Client Restructure
......@@ -27,7 +27,7 @@ var expectedMP = messagePart{
// Tests that a new function part is successfully created.
func Test_newMessagePart(t *testing.T) {
testStr := []byte{'t', 'e', 's', 't', 'i', 'n', 'g'}
goTmp := newMessagePart(32, 6, testStr, len(testStr))
goTmp := newMessagePart(32, 6, testStr, len(testStr)+8)
if !reflect.DeepEqual(goTmp, expectedMP) {
t.Errorf("MessagePart received and MessagePart expected do not match."+
"\nexpected: %#v\nreceived: %#v", expectedMP, goTmp)
......
......@@ -70,7 +70,7 @@ func TestPartitioner_Partition(t *testing.T) {
// Test that Partitioner.HandlePartition can handle a message part.
func TestPartitioner_HandlePartition(t *testing.T) {
p := NewPartitioner(versioned.NewKV(ekv.MakeMemstore()), 256)
m := newMessagePart(1107, 1, []byte(ipsumTestStr), 256)
m := newMessagePart(1107, 1, []byte(ipsumTestStr), len(ipsumTestStr)+32)
_, _ = p.HandlePartition(
&id.DummyUser,
......@@ -83,7 +83,8 @@ func TestPartitioner_HandlePartition(t *testing.T) {
func TestPartitioner_HandleFirstPartition(t *testing.T) {
p := NewPartitioner(versioned.NewKV(ekv.MakeMemstore()), 256)
m := newFirstMessagePart(
catalog.XxMessage, 1107, 1, netTime.Now(), []byte(ipsumTestStr), 256)
catalog.XxMessage, 1107, 1, netTime.Now(), []byte(ipsumTestStr),
len(ipsumTestStr)+32)
_, _ = p.HandlePartition(
&id.DummyUser,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment