Skip to content

Fix Angular integration test timeout by simplifying fixture - #1323

Merged
ivanovac merged 1 commit into
masterfrom
fix-angular-integration-test-timeout
Aug 21, 2026
Merged

ivanovac merged 1 commit into
masterfrom
fix-angular-integration-test-timeout

Conversation

@ivanovac

@ivanovac ivanovac commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Problem

The Angular integration test (deploying an angular app) consistently fails due to CF's 15-minute staging timeout.

Timeline from failing test logs:

Stage Duration
npm install ~5 min
ng build --prod ~7-8 min
Other staging steps ~2 min
Total ~15+ min → TIMEOUT

Root Cause

The angular_dotnet fixture uses Angular 13 with:

  • Heavy production build optimizations (tree-shaking, minification, AOT)
  • 958 npm packages including unused test/dev dependencies
  • Combined staging time exceeds CF's hard 15-minute limit

Solution

  1. Use --optimization=false in production build
    Skips expensive minification while still testing production configuration path

  2. Remove unused dependencies from package.json:

    • Test deps: karma, jasmine-core, karma-* plugins, @types/jasmine
    • Runtime deps: oidc-client, @angular/platform-server, run-script-os, jquery, popper.js
  3. Remove test and serve targets from angular.json

    • Removed test architect target (karma-based testing)
    • Removed serve architect target (dev server with proxy)
    • Removed server architect target (SSR)
  4. Remove unused files:

    • karma.conf.js, tsconfig.spec.json, src/test.ts
    • proxy.conf.js, aspnetcore-https.js
  5. Regenerate package-lock.json

    • Reduces packages from 958 to 880 (-8%)
    • Reduces vulnerabilities from 92 to 46 (-50%)

Impact

Metric Before After
npm packages 958 880
Vulnerabilities 92 46
Estimated staging ~15+ min ~8-10 min

Testing

  • Integration tests pass on cflinuxfs4
  • Integration tests pass on cflinuxfs5
  • App still serves Angular content correctly

Related

- Use --configuration production --optimization=false to skip heavy
  minification while still testing production config path
- Remove unused test dependencies (karma, jasmine)
- Remove unused runtime dependencies (oidc-client, platform-server)
- Remove test/serve config from angular.json
- Reduces packages from 958 to 880, vulnerabilities from 92 to 46

This keeps staging time safely under CF's 15-minute limit while still
validating the dotnet-core buildpack's Node.js integration.
@ivanovac
ivanovac force-pushed the fix-angular-integration-test-timeout branch from 18672a4 to 0b47cb7 Compare August 21, 2026 07:56

@tnikolova82 tnikolova82 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@ivanovac
ivanovac merged commit d702795 into master Aug 21, 2026
3 of 5 checks passed
@ivanovac
ivanovac deleted the fix-angular-integration-test-timeout branch August 21, 2026 08:55
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.

2 participants