Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 601364a

Browse files
bgvladedivacmergify[bot]
authored andcommitted
Feature/improve tests syntax (#35667)
* feature/improve-tests-syntax, update increment * feature/improve-tests-syntax, update increment * feature/improve-tests-syntax, update increment * feature/improve-tests-syntax, improve changelog * feature/feature/improve-tests-syntax, add summary to proper changelog file (cherry picked from commit 949d713)
1 parent 9edc373 commit 601364a

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

CHANGELOG-developer.next.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ The list below covers the major changes between 7.0.0-rc2 and main only.
143143
- Add support for `credentials_json` in `gcp` module, all metricsets {pull}29584[29584]
144144
- Add gcp firestore metricset. {pull}29918[29918]
145145
- Added TESTING_FILEBEAT_FILEPATTERN option for filebeat module pytests {pull}30103[30103]
146+
- Improve tests files with shorter statements. {pull}35667[35667]
146147
- Add gcp dataproc metricset. {pull}30008[30008]
147148
- Add Github action for linting
148149
- Add regex support for drop_fields processor.

filebeat/tests/load/load.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@
3434
randomString = ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(length))
3535
log_message = timestamp + " " + str(count) + " " + str(uuid.uuid4()) + " " + randomString
3636
my_logger.debug(log_message)
37-
count = count + 1
37+
count += 1
3838
time.sleep(sleepTime)

filebeat/tests/open-file-handlers/log_file.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
while True:
2323
# for i in range(0, 10000):
2424
time.sleep(random.uniform(0, 0.1))
25-
i = i + 1
25+
i += 1
2626
# Tries to cause some more heavy peaks
2727
events = random.randrange(10) + 1
2828
for n in range(events):

0 commit comments

Comments
 (0)