The Wayback Machine - https://web.archive.org/web/20201130164718/https://github.com/rclone/rclone/issues/4529
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

TestParseDuration fails on Linux #4529

Open
negative0 opened this issue Aug 24, 2020 · 0 comments
Open

TestParseDuration fails on Linux #4529

negative0 opened this issue Aug 24, 2020 · 0 comments

Comments

@negative0
Copy link
Member

@negative0 negative0 commented Aug 24, 2020

What is the problem you are having with rclone?

While running make quicktest, the test parse duration fails every time. @ncw has pointed out that the problem is with time zone.

TZ=Asia/Kolkata go test -v -run TestParseDuration

Fails while the following passes,

TZ=Europe/London go test -v -run TestParseDuration

What is your rclone version (output from rclone version)

rclone v1.52.2-269-g05703ba2-plugins2-beta

  • os/arch: linux/amd64
  • go version: go1.14.4

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Pop OS! 64 bits

Which cloud storage system are you using? (eg Google Drive)

NA

The command you were trying to run (eg rclone copy /tmp remote:tmp)

make quicktest

A log from the command with the -vv flag (eg output from rclone -vv copy /tmp remote:tmp)

--- FAIL: TestParseDuration (0.00s)
    parseduration_test.go:53: 
        	Error Trace:	parseduration_test.go:53
        	Error:      	Should be true
        	Test:       	TestParseDuration
        	Messages:   	2001-02-03
    parseduration_test.go:53: 
        	Error Trace:	parseduration_test.go:53
        	Error:      	Should be true
        	Test:       	TestParseDuration
        	Messages:   	2001-02-03 10:11:12
    parseduration_test.go:53: 
        	Error Trace:	parseduration_test.go:53
        	Error:      	Should be true
        	Test:       	TestParseDuration
        	Messages:   	2001-02-03T10:11:12
FAIL
@ncw ncw added the bug label Aug 25, 2020
@ncw ncw added this to the v1.54 milestone Aug 25, 2020
Zacho2 added a commit to Zacho2/rclone that referenced this issue Sep 7, 2020
TestParseDuration relied on an elapsed time calculation which
would vary based on the system local time. Fix the test by not relying
on the system time location. Also make the test more deterministic
by injecting time in tests rather than using system time.

Fixes rclone#4529.
Zacho2 added a commit to Zacho2/rclone that referenced this issue Sep 7, 2020
TestParseDuration relied on an elapsed time calculation which
would vary based on the system local time. Fix the test by not relying
on the system time location. Also make the test more deterministic
by injecting time in tests rather than using system time.

Fixes rclone#4529.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.