Skip to content

test: fix race condition on rebuild test #4703

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions tests/e2e/tests/build/rebuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@ export default function() {
// Add a lazy module.
.then(() => ng('generate', 'module', 'lazy', '--routing'))
// Just wait for the rebuild, otherwise we might be validating the last build.
.then(() => wait(1000))
.then(() => wait(2000))
.then(() => writeFile('src/app/app.module.ts', `
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';

import { AppComponent } from './app.component';
import { RouterModule } from '@angular/router';

@NgModule({
declarations: [
AppComponent
Expand All @@ -60,6 +60,7 @@ export default function() {
})
export class AppModule { }
`))
.then(() => wait(2000))
// Should trigger a rebuild with a new bundle.
.then(() => waitForAnyProcessOutputToMatch(
/webpack: bundle is now VALID|webpack: Compiled successfully./, 10000))
Expand Down