Skip to content

Unit tests should not store data in the .lemminx folder under the user's home directory. #1265

@fbricon

Description

@fbricon

Unit tests currently write data in ~/.lemminx, this is wrong:

[INFO] Running XML Validation Command Test
2022-07-29 10:22:14.995:INFO::main: Logging initialized @19707ms to org.eclipse.jetty.util.log.StdErrLog
2022-07-29 10:22:15.094:INFO:oejs.Server:main: jetty-9.4.41.v20210516; built: 2021-05-16T23:56:28.993Z; git: 98607f93c7833e7dc59489b13f3cb0a114fb9f4c; jvm 17.0.1+12
2022-07-29 10:22:15.146:INFO:oejs.AbstractConnector:main: Started ServerConnector@7c40ffef{HTTP/1.1, (http/1.1)}{0.0.0.0:55113}
2022-07-29 10:22:15.146:INFO:oejs.Server:main: Started @19858ms
Jul 29, 2022 10:22:15 AM org.eclipse.lemminx.uriresolver.FileServer start
INFO: http server started on port 55113
Jul 29, 2022 10:22:15 AM org.eclipse.lemminx.uriresolver.FileServer getUri
INFO: remote uri : http://localhost:55113/tag.xsd
Jul 29, 2022 10:22:15 AM org.eclipse.lemminx.uriresolver.FileServer getUri
INFO: remote uri : http://localhost:55113/tag.dtd
Jul 29, 2022 10:22:15 AM org.eclipse.lemminx.uriresolver.CacheResourcesManager lambda$downloadResource$0
INFO: Downloading http://localhost:55113/tag.xsd to /Users/fbricon/.lemminx/cache/http/localhost/55113/tag.xsd...
Jul 29, 2022 10:22:15 AM org.eclipse.lemminx.uriresolver.CacheResourcesManager lambda$downloadResource$0
INFO: Downloaded http://localhost:55113/tag.xsd to /Users/fbricon/.lemminx/cache/http/localhost/55113/tag.xsd in 111ms
Jul 29, 2022 10:22:17 AM org.eclipse.lemminx.uriresolver.CacheResourcesManager lambda$downloadResource$0
INFO: Downloading http://localhost:55113/tag.dtd to /Users/fbricon/.lemminx/cache/http/localhost/55113/tag.dtd...
Jul 29, 2022 10:22:17 AM org.eclipse.lemminx.uriresolver.CacheResourcesManager lambda$downloadResource$0
INFO: Downloaded http://localhost:55113/tag.dtd to /Users/fbricon/.lemminx/cache/http/localhost/55113/tag.dtd in 4ms
Jul 29, 2022 10:22:21 AM org.eclipse.lemminx.uriresolver.CacheResourcesManager lambda$downloadResource$0
INFO: Downloading http://localhost:55113/tag.dtd to /Users/fbricon/.lemminx/cache/http/localhost/55113/tag.dtd...
Jul 29, 2022 10:22:21 AM org.eclipse.lemminx.uriresolver.CacheResourcesManager lambda$downloadResource$0
INFO: Downloading http://localhost:55113/tag.xsd to /Users/fbricon/.lemminx/cache/http/localhost/55113/tag.xsd...
Jul 29, 2022 10:22:21 AM org.eclipse.lemminx.uriresolver.CacheResourcesManager lambda$downloadResource$0
INFO: Downloaded http://localhost:55113/tag.dtd to /Users/fbricon/.lemminx/cache/http/localhost/55113/tag.dtd in 3ms
Jul 29, 2022 10:22:21 AM org.eclipse.lemminx.uriresolver.CacheResourcesManager lambda$downloadResource$0
INFO: Downloaded http://localhost:55113/tag.xsd to /Users/fbricon/.lemminx/cache/http/localhost/55113/tag.xsd in 3ms
2022-07-29 10:22:22.373:INFO:oejs.AbstractConnector:main: Stopped ServerConnector@7c40ffef{HTTP/1.1, (http/1.1)}{0.0.0.0:0}
2022-07-29 10:22:22.375:INFO:oejs.Server:main: jetty-9.4.41.v20210516; built: 2021-05-16T23:56:28.993Z; git: 98607f93c7833e7dc59489b13f3cb0a114fb9f4c; jvm 17.0.1+12
2022-07-29 10:22:22.377:INFO:oejs.AbstractConnector:main: Started ServerConnector@5d05f453{HTTP/1.1, (http/1.1)}{0.0.0.0:55126}
2022-07-29 10:22:22.377:INFO:oejs.Server:main: Started @27089ms
Jul 29, 2022 10:22:22 AM org.eclipse.lemminx.uriresolver.FileServer start

Screenshot 2022-07-29 at 10 24 56

Tests should use a clean cache directory, that would not pollute the user cache and also ensure idempotency

Metadata

Metadata

Assignees

Labels

builddebtThis issue or enhancement is related to technical debt

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions