Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
client
Commits
c8a5510d
Commit
c8a5510d
authored
3 years ago
by
Jono Wenger
Browse files
Options
Downloads
Patches
Plain Diff
fix parse
parent
9fc3806c
Branches
Branches containing commit
Tags
Tags containing commit
3 merge requests
!510
Release
,
!207
WIP: Client Restructure
,
!203
Symmetric broadcast
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
e2e/parse/partition_test.go
+4
-4
4 additions, 4 deletions
e2e/parse/partition_test.go
with
4 additions
and
4 deletions
e2e/parse/partition_test.go
+
4
−
4
View file @
c8a5510d
...
@@ -24,7 +24,7 @@ var ipsumTestStr = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cra
...
@@ -24,7 +24,7 @@ var ipsumTestStr = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cra
// Test that NewPartitioner outputs a correctly made Partitioner
// Test that NewPartitioner outputs a correctly made Partitioner
func
TestNewPartitioner
(
t
*
testing
.
T
)
{
func
TestNewPartitioner
(
t
*
testing
.
T
)
{
p
:=
NewPartitioner
(
4096
,
versioned
.
NewKV
(
make
(
ekv
.
Memstore
)))
p
:=
NewPartitioner
(
versioned
.
NewKV
(
make
(
ekv
.
Memstore
))
,
4096
)
if
p
.
baseMessageSize
!=
4096
{
if
p
.
baseMessageSize
!=
4096
{
t
.
Errorf
(
"baseMessageSize content mismatch."
+
t
.
Errorf
(
"baseMessageSize content mismatch."
+
...
@@ -57,7 +57,7 @@ func TestNewPartitioner(t *testing.T) {
...
@@ -57,7 +57,7 @@ func TestNewPartitioner(t *testing.T) {
// Test that no error is returned running Partitioner.Partition.
// Test that no error is returned running Partitioner.Partition.
func
TestPartitioner_Partition
(
t
*
testing
.
T
)
{
func
TestPartitioner_Partition
(
t
*
testing
.
T
)
{
p
:=
NewPartitioner
(
len
(
ipsumTestStr
),
versioned
.
NewKV
(
make
(
ekv
.
Memstore
)))
p
:=
NewPartitioner
(
versioned
.
NewKV
(
make
(
ekv
.
Memstore
))
,
len
(
ipsumTestStr
)
)
_
,
_
,
err
:=
p
.
Partition
(
_
,
_
,
err
:=
p
.
Partition
(
&
id
.
DummyUser
,
catalog
.
XxMessage
,
netTime
.
Now
(),
[]
byte
(
ipsumTestStr
))
&
id
.
DummyUser
,
catalog
.
XxMessage
,
netTime
.
Now
(),
[]
byte
(
ipsumTestStr
))
...
@@ -68,7 +68,7 @@ func TestPartitioner_Partition(t *testing.T) {
...
@@ -68,7 +68,7 @@ func TestPartitioner_Partition(t *testing.T) {
// Test that Partitioner.HandlePartition can handle a message part.
// Test that Partitioner.HandlePartition can handle a message part.
func
TestPartitioner_HandlePartition
(
t
*
testing
.
T
)
{
func
TestPartitioner_HandlePartition
(
t
*
testing
.
T
)
{
p
:=
NewPartitioner
(
len
(
ipsumTestStr
),
versioned
.
NewKV
(
make
(
ekv
.
Memstore
)))
p
:=
NewPartitioner
(
versioned
.
NewKV
(
make
(
ekv
.
Memstore
))
,
len
(
ipsumTestStr
)
)
m
:=
newMessagePart
(
1107
,
1
,
[]
byte
(
ipsumTestStr
))
m
:=
newMessagePart
(
1107
,
1
,
[]
byte
(
ipsumTestStr
))
_
,
_
=
p
.
HandlePartition
(
_
,
_
=
p
.
HandlePartition
(
...
@@ -80,7 +80,7 @@ func TestPartitioner_HandlePartition(t *testing.T) {
...
@@ -80,7 +80,7 @@ func TestPartitioner_HandlePartition(t *testing.T) {
// Test that HandlePartition can handle a first message part
// Test that HandlePartition can handle a first message part
func
TestPartitioner_HandleFirstPartition
(
t
*
testing
.
T
)
{
func
TestPartitioner_HandleFirstPartition
(
t
*
testing
.
T
)
{
p
:=
NewPartitioner
(
len
(
ipsumTestStr
),
versioned
.
NewKV
(
make
(
ekv
.
Memstore
)))
p
:=
NewPartitioner
(
versioned
.
NewKV
(
make
(
ekv
.
Memstore
))
,
len
(
ipsumTestStr
)
)
m
:=
newFirstMessagePart
(
m
:=
newFirstMessagePart
(
catalog
.
XxMessage
,
1107
,
1
,
netTime
.
Now
(),
[]
byte
(
ipsumTestStr
))
catalog
.
XxMessage
,
1107
,
1
,
netTime
.
Now
(),
[]
byte
(
ipsumTestStr
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment