Skip to content

Fix #789 Make assertResponse shorter in Chart and Dashboard tests - #791

Merged
sureshms merged 1 commit into
mainfrom
issue789
Oct 16, 2021
Merged

sureshms merged 1 commit into
mainfrom
issue789

Conversation

@sureshms

Copy link
Copy Markdown
Contributor

Describe your changes :

This change makes test code smaller and more readable

Type of change :

  • Improvement
  • [] New feature
  • [] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [] Documentation

Frontend Preview (Screenshots) :

For frontend related change, please link screenshots of your changes preview! Optional for backend related changes.

Checklist:

  • I have read the CONTRIBUTING document.
  • I have performed a self-review of my own.
  • I have tagged my reviewers below.
  • I have commented on my code, particularly in hard-to-understand areas.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • All new and existing tests passed.

Reviewers

@sureshms
sureshms merged commit acbe944 into main Oct 16, 2021
@ayush-shah
ayush-shah deleted the issue789 branch October 19, 2021 18:52
Khairajani added a commit that referenced this pull request Nov 4, 2026
…lenv, black, pytest, tornado) (#36641)

* ingestion: bump brotlicffi to 1.2.1.0 and virtualenv to 21.15.1

Fixes GHSA-9v8h-qqgm-4m35 (brotlicffi, Dependabot #794) and
GHSA-cx6f-vjhg-g3cc (virtualenv, Dependabot #795) in ingestion/uv.lock.

* ingestion: format generated models with ruff and drop black from the lock

black only reached the lock through datamodel-code-generator. Fixing
GHSA-3936-cmfr-pm3m and GHSA-cg8m-r9f2-5wm2 needs black >= 26.3.1, whose
pathspec >= 1.0 floor forces runtime dbt-core 1.11 -> 1.12. Codegen now
formats with ruff (generated models are AST-identical) and black is excluded.

* ingestion: bump pytest to 9.0.3 and give each source its own topology context

Fixes GHSA-6w46-j5rx-g56g (pytest, Dependabot #791).

The service source bases declared the topology context at class level, so
every source of a type in one process shared it. pytest 8.2+ builds unittest
TestCase instances lazily, which exposed the leak as cross-file test failures.
The context is now a per-instance cached_property on TopologyRunnerMixin.
Tests that chained context between methods set their own, and subTest labels
are plain strings so xdist can serialize pytest 9's subtest reports.

* ingestion: require tornado 6.6 on Python 3.11+

Fixes GHSA-pcg2-g6cj-q92c, GHSA-r4j5-9xpp-3985 and GHSA-pw9p-v7r6-gx4p
where it can: tornado 6.6 needs Python 3.11 and there is no 6.5.x backport,
so the Python 3.10 fork stays on 6.5.10.

* ingestion: fix static checks for per-source context, install ruff for image codegen

* fix(ingestion): give each source its own queue and seen-entity state

The class-level queue on TopologyRunnerMixin and the *_source_state sets on
every service base were shared by all sources of a type in one process, so a
second source or run inherited the FQNs the first one saw and mark-deleted
could never find those entities stale. They are now PerSourceState
descriptors, created per instance with vars(instance).setdefault because
worker threads can touch them first.

Also uninstall black after codegen in the CI Dockerfiles, since pip still
pulls it in with datamodel-code-generator.

* docs(decisions): record that topology source run state is per instance

* ingestion: bump pyasn1 to 0.6.5

* ingestion: stop sleep-counting tests counting other threads, use the production lineage timeout in tests

* ingestion: create the Atlas test entities in setUp, not TestCase.__init__

* ingestion: keep the parser scenario's memory case inside its timeout

MemoryLimitExceeded is raised only after the function returns, so the memory
scenario ran all its sleeps (about 2.5s) under the 3s timeout and timed out on
a slow runner. Shorten the per-chunk sleep; the peak is still sampled during
the parse_time sleep.

---------

Co-authored-by: --global <--global>
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.

1 participant