Skip to content

Event tuple same key,but error size #52

@zqhxuyuan

Description

@zqhxuyuan

I test Event API, but error happen last line:

        Event event = new BaseEvent(UUID.randomUUID().toString(), System.currentTimeMillis());
        event.put(new Tuple("key1", "val1"));
        event.put(new Tuple("key2", "val2"));
        event.put(new Tuple("key3", "val3"));

        event.put(new Tuple("key1", "val11"));

        Collection<Tuple> tuples = event.getAll("key1");
        assertEquals(2, tuples.size());

        event.put(new Tuple("key2", "val2"));
        Collection<Tuple> tuples2 = event.getAll("key2");
        assertEquals(1, tuples.size());

the firset assertEquals pass, I know, because key1 has two values, which make two tuple.
but second assertEquals failed:

java.lang.AssertionError: 
Expected :1
Actual   :2

As this API Error, test case at JoinBoltIT failed(may be other test case fail too).
then I print tuples2:

[Tuple{key='key2', value=val2, metadata={}}, Tuple{key='key2', value=val2, metadata={}}]

this two tuple are the same, which should be merge to One Tuple.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions