Skip to content

Conversation

@scarapella
Copy link
Contributor

Hello

Level0 is great. Thanks for making it.

Since the main overpass instance is a bit overwhelmed lately I added 3 new mirrors from

https://wiki.openstreetmap.org/wiki/Overpass_API#Public_Overpass_API_instances

These instances all require https so I tweaked the code to manage that.

Cheers
Scarapella

@Zverik
Copy link
Owner

Zverik commented Jan 14, 2026

Thanks! I've run the test, but they fail for some reason. Please take a look, or I will somewhere in the future.

@scarapella
Copy link
Contributor Author

Hello,

Sorry about the failures. I was a bad dev. I had the failure locally and since the issue occurred on a clean, unmodified repo and it wasn't near anything I was touching, I assumed it was a local issue. (mea culpa)

Since the test here failed, I had a bit of a deeper look. The test that fails is this one:
// Button "Show osmChange" $this->elementByCSS('input[name="showosc"]')->click(); $this->assertStringContainsString('this will be uploaded to the server', $this->webDriver->getPageSource()); $this->assertMatchesRegularExpression('/<osmChange [^&]+>\s*<\/osmChange>/', $this->webDriver->getPageSource());

The test seems totally valid as when I manual simulate (on web, not local) by clicking on input[name="showosc"] should generate this page with the string "this will be uploaded to the server"
image

However, looking at the test result, the page that is returned is this one:

image

which corresponds to the the result of the previous test:
// Button "Check for conflicts" $this->elementByCSS('input[name="check"]')->click(); $this->assertStringContainsString('Nothing is modified', $this->webDriver->getPageSource());

I also had some intermittent failures on other tests in this same file which went away with subsequent runs. In your experience do you think is it possible that there is some race condition where the new page is not yet fully loaded?

@mtmail
Copy link
Contributor

mtmail commented Jan 14, 2026

Yes, could be a race condition. I dealt with lots on other test suites (Ruby, Javascript). Chromium, when remote controlled, started to return success for a click before the next page loaded. I can't remember which version number, it was last year. Usual work-around is a sleep(1) or a routine which waits for a certain text to appear with timeout.

@scarapella
Copy link
Contributor Author

Yeah, looks like a timing issue. Since you'd already used the "take a nap strategy" i.e. sleep(2); I took the same approach.

Else I think this would have worked:
$this->webDriver->wait()->until(WebDriverExpectedCondition::presenceOfElementLocated(WebDriverBy::id('osmchange')));

@Zverik Zverik merged commit 8197655 into Zverik:master Jan 15, 2026
1 check passed
@Zverik
Copy link
Owner

Zverik commented Jan 15, 2026

Thank you! It wasn't we who written the test, so I had a hard time understanding the issue :)

@scarapella scarapella deleted the additional-overpass-mirrors branch January 15, 2026 10:55
@scarapella
Copy link
Contributor Author

Well, same for me then. 🤣Thanks for your help!

@mtmail
Copy link
Contributor

mtmail commented Jan 15, 2026

Looks good (I wrote the test some time ago)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants