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

docs: explanation on how to deal with tests failing on windows #575

Merged
merged 6 commits into from
Jun 14, 2023

Conversation

Ruchip16
Copy link
Contributor

@Ruchip16 Ruchip16 commented Aug 2, 2022

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

README.md Outdated
1. Make sure code is well formatted and secure `npm run lint`
2. Make sure all tests pass `npm test`

If in-case some tests still fails randomly during local development, the reason to it might be when you develop something in the parser and even though you did not make any changes affects tests, and the tests are failing then you can run:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is only relevant for windows systems, I think we should highlight that somehow here, what do you think @Ruchip16🤔?

Maybe it makes sense to add a sub section such as ### Windows environments and place this information there? 🤔

cc @alequetzalli in case you have time and have an opinion 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes we can add that also then we need to add sub-sections for Mac or Linux users as well then right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not unless you have something specific you want to add there 🙂 To me a section only makes sense if there is something to highlight, i.e. in this case windows environment might act weird in some cases.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed, would do the changes in the PR

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonaslagoni Totally, if it's just for Windows OS, let's def add a ### Windows title.

(I don't think you need to write the word 'environment' too, it's pretty clear to just say Windows.)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to change this sentence I think: the reason to it might be when you develop something in the parser and even though you did not make any changes affects tests

To me it is not clear what exactly the reason is. Maybe something along the lines of:

Suggested change
If in-case some tests still fails randomly during local development, the reason to it might be when you develop something in the parser and even though you did not make any changes affects tests, and the tests are failing then you can run:
For Windows environments, some tests might still fail randomly during local development even when you made no changes to the tests. The reason for this from file endings are different than expected and this comes from Git defaulting to an unexpected file ending. If you encounter this issue you can run the following commands to set Git to use the expected one:

What do you think @Ruchip16 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yess absolutely the later one gives more clarity than its prior, I would do the changes

@derberg
Copy link
Member

derberg commented Aug 16, 2022

@Ruchip16 hey, when you will work on updates to this PR, please also adjust the title of this PR, to follow conventional commits. In other words, change it into something like docs: explanation on how to deal with tests failing on windows

@Ruchip16 Ruchip16 changed the title Random Failing tests docs: explanation on how to deal with tests failing on windows Aug 16, 2022
@Ruchip16
Copy link
Contributor Author

Ruchip16 commented Aug 16, 2022

@Ruchip16 hey, when you will work on updates to this PR, please also adjust the title of this PR, to follow conventional commits. In other words, change it into something like docs: explanation on how to deal with tests failing on windows

hey, yes I would do it within 1-2 days as I was busy with the campus placement drives, but no worries I'm back, I would fix it asap.

@sonarcloud
Copy link

sonarcloud bot commented Aug 17, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

README.md Outdated
@@ -235,9 +235,17 @@ A few advantages of this solution:

## Develop

### Windows
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would move this section below the already existing list of steps to do during development, and then the line about the windows specific scenario you place this section in the end.

The reason is that this list of steps is not only related to windows. It is only the special case about the file ending 🙂

README.md Outdated
1. Make sure code is well formatted and secure `npm run lint`
2. Make sure all tests pass `npm test`

If in-case some tests still fails randomly during local development, the reason to it might be when you develop something in the parser and even though you did not make any changes affects tests, and the tests are failing then you can run:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to change this sentence I think: the reason to it might be when you develop something in the parser and even though you did not make any changes affects tests

To me it is not clear what exactly the reason is. Maybe something along the lines of:

Suggested change
If in-case some tests still fails randomly during local development, the reason to it might be when you develop something in the parser and even though you did not make any changes affects tests, and the tests are failing then you can run:
For Windows environments, some tests might still fail randomly during local development even when you made no changes to the tests. The reason for this from file endings are different than expected and this comes from Git defaulting to an unexpected file ending. If you encounter this issue you can run the following commands to set Git to use the expected one:

What do you think @Ruchip16 ?

@magicmatatjahu
Copy link
Member

@Ruchip16 Any update? Do you have a time to apply a review suggestions?

@Ruchip16
Copy link
Contributor Author

Ruchip16 commented Nov 10, 2022

@Ruchip16 Any update? Do you have time to apply review suggestions?

Hey yes, I applied the changes & sorry for the delay, I was actually working on this PR and hence i completely forgot about this one

@sonarcloud
Copy link

sonarcloud bot commented Nov 10, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

magicmatatjahu
magicmatatjahu previously approved these changes Dec 20, 2022
Copy link
Member

@magicmatatjahu magicmatatjahu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM @derberg do you wanna something?

@sonarcloud
Copy link

sonarcloud bot commented Dec 20, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this pull request, add a comment with detailed explanation.

There can be many reasons why some specific pull request has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this pull request forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@github-actions github-actions bot added the stale label Apr 20, 2023
@github-actions github-actions bot removed the stale label Jun 7, 2023
Copy link
Member

@jonaslagoni jonaslagoni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for such a HUGE delay @Ruchip16, thought this was taken care of. My apologies 🙇

@sonarcloud
Copy link

sonarcloud bot commented Jun 14, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@jonaslagoni
Copy link
Member

/rtm

@Ruchip16
Copy link
Contributor Author

Sorry for such a HUGE delay @Ruchip16, thought this was taken care of. My apologies bow

not an issue, glad that it is getting merged now, can you also add me to contributors?

@jonaslagoni jonaslagoni merged commit 922403f into asyncapi:master Jun 14, 2023
@jonaslagoni
Copy link
Member

@all-contributors please add @Ruchip16 for docs

@allcontributors
Copy link
Contributor

@jonaslagoni

I've put up a pull request to add @Ruchip16! 🎉

@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 2.1.0-next-major-spec.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 2.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

Document how to fix randomly failing tests during development
6 participants