From 05571529bd03c893431404b8085f10b16e7b4611 Mon Sep 17 00:00:00 2001 From: bgvladedivac Date: Sat, 3 Jun 2023 16:15:54 -0400 Subject: [PATCH 1/5] feature/improve-tests-syntax, update increment --- filebeat/tests/open-file-handlers/log_file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filebeat/tests/open-file-handlers/log_file.py b/filebeat/tests/open-file-handlers/log_file.py index 6299449a4cf0..12e76b8240f6 100644 --- a/filebeat/tests/open-file-handlers/log_file.py +++ b/filebeat/tests/open-file-handlers/log_file.py @@ -22,7 +22,7 @@ while True: # for i in range(0, 10000): time.sleep(random.uniform(0, 0.1)) - i = i + 1 + i += 1 # Tries to cause some more heavy peaks events = random.randrange(10) + 1 for n in range(events): From 4a160f340e8e7590b4a551746d1dec66940e6e63 Mon Sep 17 00:00:00 2001 From: bgvladedivac Date: Sat, 3 Jun 2023 16:28:07 -0400 Subject: [PATCH 2/5] feature/improve-tests-syntax, update increment --- CHANGELOG.next.asciidoc | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 977088d85770..923e99820c23 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -15,6 +15,7 @@ https://github.com/elastic/beats/compare/v8.7.1\...main[Check the HEAD diff] *Filebeat* +- Improve tests/open-file-handlers/log_file.py with a shorter statement. *Heartbeat* From 55ffe0dfb1a49037ec9242cda708ae5658dc6c5c Mon Sep 17 00:00:00 2001 From: bgvladedivac Date: Sat, 3 Jun 2023 16:39:49 -0400 Subject: [PATCH 3/5] feature/improve-tests-syntax, update increment --- filebeat/tests/load/load.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filebeat/tests/load/load.py b/filebeat/tests/load/load.py index 5e0fdd8979b4..12bdac849e0f 100644 --- a/filebeat/tests/load/load.py +++ b/filebeat/tests/load/load.py @@ -34,5 +34,5 @@ randomString = ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(length)) log_message = timestamp + " " + str(count) + " " + str(uuid.uuid4()) + " " + randomString my_logger.debug(log_message) - count = count + 1 + count += 1 time.sleep(sleepTime) From bbdfe15a852fbe4e47d97817a7e5493202efff96 Mon Sep 17 00:00:00 2001 From: bgvladedivac Date: Sat, 3 Jun 2023 16:41:55 -0400 Subject: [PATCH 4/5] feature/improve-tests-syntax, improve changelog --- CHANGELOG.next.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 923e99820c23..72355459338a 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -15,7 +15,7 @@ https://github.com/elastic/beats/compare/v8.7.1\...main[Check the HEAD diff] *Filebeat* -- Improve tests/open-file-handlers/log_file.py with a shorter statement. +- Improve tests files with shorter statements. *Heartbeat* From 45fbeacb1e6454ec5f79536f06c60115d0c1b1e5 Mon Sep 17 00:00:00 2001 From: bgvladedivac Date: Mon, 5 Jun 2023 15:14:29 -0400 Subject: [PATCH 5/5] feature/feature/improve-tests-syntax, add summary to proper changelog file --- CHANGELOG-developer.next.asciidoc | 1 + CHANGELOG.next.asciidoc | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG-developer.next.asciidoc b/CHANGELOG-developer.next.asciidoc index 5d009736c342..8982c98f373a 100644 --- a/CHANGELOG-developer.next.asciidoc +++ b/CHANGELOG-developer.next.asciidoc @@ -144,6 +144,7 @@ The list below covers the major changes between 7.0.0-rc2 and main only. - Add support for `credentials_json` in `gcp` module, all metricsets {pull}29584[29584] - Add gcp firestore metricset. {pull}29918[29918] - Added TESTING_FILEBEAT_FILEPATTERN option for filebeat module pytests {pull}30103[30103] +- Improve tests files with shorter statements. {pull}35667[35667] - Add gcp dataproc metricset. {pull}30008[30008] - Add Github action for linting - Add regex support for drop_fields processor. diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 72355459338a..977088d85770 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -15,7 +15,6 @@ https://github.com/elastic/beats/compare/v8.7.1\...main[Check the HEAD diff] *Filebeat* -- Improve tests files with shorter statements. *Heartbeat*