Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ottl test cases should not use Local timezone #31797

Closed
ppalsingh opened this issue Mar 17, 2024 · 2 comments
Closed

ottl test cases should not use Local timezone #31797

ppalsingh opened this issue Mar 17, 2024 · 2 comments
Assignees
Labels
flaky test a test is flaky pkg/ottl

Comments

@ppalsingh
Copy link
Contributor

ppalsingh commented Mar 17, 2024

Component(s)

No response

What happened?

Description

ottl test cases fail when executed from India timezone. The test case uses Local timezone which should be not be used. We should use UTC timezone in test cases.

Steps to Reproduce

Execute testcases in India timezone.

Expected Result

Testcases should pass.

Actual Result

Testcases fail.

Collector version

v0.96.0

Environment information

Environment

OS: Ubuntu 20.04
Compiler(if manually compiled): go1.21.3

OpenTelemetry Collector configuration

No response

Log output

--- FAIL: Test_TruncateTime (0.00s)
    --- FAIL: Test_TruncateTime/truncate_old_time (0.00s)
        func_truncate_time_test.go:76: 
                Error Trace:   opentelemetry-collector-contrib/pkg/ottl/ottlfuncs/func_truncate_time_test.go:76
                Error:          Not equal: 
                                expected: 337318200000000000
                                actual  : 337320000000000000
                Test:           Test_TruncateTime/truncate_old_time
FAIL
FAIL    github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs    0.031s

Additional context

No response

@ppalsingh ppalsingh added bug Something isn't working needs triage New item requiring triage labels Mar 17, 2024
@Frapschen Frapschen removed the needs triage New item requiring triage label Mar 18, 2024
TylerHelmuth pushed a commit that referenced this issue Mar 18, 2024
**Description:** <Describe what has changed.>
Test case should not use Local timezone, it should use UTC timezone.

**Link to tracking Issue:**
#31797
@crobert-1 crobert-1 added pkg/ottl flaky test a test is flaky and removed bug Something isn't working labels Mar 18, 2024
@crobert-1
Copy link
Member

Fixed by #31798

Copy link
Contributor

Pinging code owners for pkg/ottl: @TylerHelmuth @kentquirk @bogdandrutu @evan-bradley. See Adding Labels via Comments if you do not have permissions to add labels yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flaky test a test is flaky pkg/ottl
Projects
None yet
Development

No branches or pull requests

3 participants