Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Add method finishedTraces to MockTracer. #359

Merged
merged 9 commits into from
Aug 27, 2019
Merged

Add method finishedTraces to MockTracer. #359

merged 9 commits into from
Aug 27, 2019

Conversation

qudongfang
Copy link
Contributor

@qudongfang qudongfang commented Aug 12, 2019

Resolves #277

Signed-off-by: qudongfang <qudongfang@gmail.com>
Signed-off-by: qudongfang <qudongfang@gmail.com>
@sjoerdtalsma
Copy link
Contributor

No other comments, thanks for the change

Signed-off-by: qudongfang <qudongfang@gmail.com>
@qudongfang
Copy link
Contributor Author

cc @pavolloffay

@whiskeysierra
Copy link

whiskeysierra commented Aug 12, 2019 via email

…Traces().

Signed-off-by: qudongfang <qudongfang@gmail.com>
@qudongfang
Copy link
Contributor Author

Alternatively it could be made read-only/unmodifiable using Collections.unmodifiable*

Thanks for your suggestion. I am not sure if we really need it to be a copy or read-only/unmodifiable.

@pavolloffay
Copy link
Member

+1 on unmodifiable

@sjoerdtalsma
Copy link
Contributor

sjoerdtalsma commented Aug 12, 2019

Not sure on unmodifiable. Each call returns a new Map structure anyway.
Any pressing reasons for the unmodifiable, seeing that the map values must become unmodifiable as well?

@carlosalberto
Copy link
Collaborator

Agreed, I don't think we have to add the unmodifiable part. For example, finishedSpans() is defined as:

    public synchronized List<MockSpan> finishedSpans() {
        return new ArrayList<>(this.finishedSpans);
    }

MockTracer.finishedTraces() unmodifiable.

Signed-off-by: qudongfang <qudongfang@gmail.com>
@qudongfang
Copy link
Contributor Author

qudongfang commented Aug 14, 2019

+1 on unmodifiable

Done.

@whiskeysierra
Copy link

whiskeysierra commented Aug 14, 2019 via email

@coveralls
Copy link

coveralls commented Aug 14, 2019

Coverage Status

Coverage increased (+0.6%) to 76.586% when pulling cf6bcce on qudongfang:finishedTraces into 70555ed on opentracing:master.

@carlosalberto carlosalberto self-requested a review August 15, 2019 14:08
@carlosalberto
Copy link
Collaborator

Hey, thanks a lot for the updates, appreciated. It looks good now, and just left a small comment about keeping the comment regarding the returned MockSpans being a copy. After that we should be good to merge ;)

Signed-off-by: qudongfang <qudongfang@gmail.com>
@carlosalberto carlosalberto merged commit 2df2a89 into opentracing:master Aug 27, 2019
@carlosalberto
Copy link
Collaborator

Merged, thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add method finishedTraces to MockTracer
6 participants