Skip to content
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

TestSizeMeasureProcessor #2754

Open
Tracked by #2538
tenthe opened this issue Apr 22, 2024 · 11 comments · May be fixed by #2758
Open
Tracked by #2538

TestSizeMeasureProcessor #2754

tenthe opened this issue Apr 22, 2024 · 11 comments · May be fixed by #2758
Assignees

Comments

@tenthe
Copy link
Contributor

tenthe commented Apr 22, 2024

No description provided.

@tenthe
Copy link
Contributor Author

tenthe commented Apr 22, 2024

@pambrocio, welcome to Apache StreamPipes!
I have created an issue to fix the test TestSizeMeasureProcessor. If you comment on this issue, I can assign it to you.
Generally this issue is about to fix the test again, it is not necessary to use parameterized tests for that.

I suspect that the old test used these parameters:

/*
 249 bytes is the base size of an object when first tested.
 Allowing up to 250 bytes comparison error in case of inconsistent base sizes across platforms
*/
return Arrays.asList(new Object[][]{
  { BYTE_SIZE, 10240 - 249, 10240.0, 250.
  { KILOBYTE_SIZE, 10240 - 249, 10.0, 0.025},
  { MEGABYTE_SIZE, (1024 * 1024) - 249, 1.0, 0.0025}
});
 }

@pambrocio
Copy link

pambrocio commented Apr 22, 2024

yes please do assign it. Can I introduce new enums to parameterize the test? Is my assumption correct that the project used JUNIT4 before and migrated to JUNIT5, causing the test case breakages? May I also know the branching convention how do I name my branch?

@bossenti
Copy link
Contributor

Can I introduce new enums to parameterize the test?

Sure. Feel free to perform any adjustments

Is my assumption correct that the project used JUNIT4 before and migrated to JUNIT5, causing the test case breakages?

Exactly

May I also know the branching convention how do I name my branch?

We do not have a strict naming convention for feature branches
In general you are free to call the branch as you like, but we suggest to use the Create a branch feature of GitHub

@bossenti
Copy link
Contributor

If you have any idea/suggestion about how to improve the tests, we are happy to hear about them

Just for context: There is a discussion about how to improve tests for pipeline elements in #2374 & #2375

@pambrocio
Copy link

may I ask how you normally run an individual test in intellij. I am getting this at the moment
image

@pambrocio
Copy link

Got a successful build, but I unsure if everything is all ok. since I don't know how to run an individual test:
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Apache StreamPipes 0.95.0-SNAPSHOT:
[INFO]
[INFO] Apache StreamPipes ................................. SUCCESS [ 1.907 s]
[INFO] streampipes-archetype-extensions-jvm ............... SUCCESS [ 0.800 s]
[INFO] streampipes-archetype-pe-sinks-flink ............... SUCCESS [ 0.062 s]
[INFO] streampipes-archetype-pe-processors-flink .......... SUCCESS [ 0.065 s]
[INFO] StreamPipes Commons ................................ SUCCESS [ 1.453 s]
[INFO] streampipes-model-shared ........................... SUCCESS [ 0.369 s]
[INFO] streampipes-vocabulary ............................. SUCCESS [ 0.580 s]
[INFO] streampipes-model .................................. SUCCESS [ 4.026 s]
[INFO] streampipes-dataformat ............................. SUCCESS [ 0.225 s]
[INFO] streampipes-messaging .............................. SUCCESS [ 0.291 s]
[INFO] streampipes-client-api ............................. SUCCESS [ 0.206 s]
[INFO] streampipes-dataformat-json ........................ SUCCESS [ 0.231 s]
[INFO] streampipes-dataformat-cbor ........................ SUCCESS [ 0.193 s]
[INFO] streampipes-dataformat-fst ......................... SUCCESS [ 0.244 s]
[INFO] streampipes-security-jwt ........................... SUCCESS [ 0.281 s]
[INFO] streampipes-model-client ........................... SUCCESS [ 0.376 s]
[INFO] streampipes-extensions-api ......................... SUCCESS [ 0.293 s]
[INFO] streampipes-test-utils ............................. SUCCESS [ 0.214 s]
[INFO] streampipes-serializers-json ....................... SUCCESS [ 0.602 s]
[INFO] streampipes-client ................................. SUCCESS [ 0.741 s]
[INFO] streampipes-measurement-units ...................... SUCCESS [ 0.831 s]
[INFO] streampipes-sdk .................................... SUCCESS [ 1.594 s]
[INFO] streampipes-connect-shared ......................... SUCCESS [ 1.716 s]
[INFO] streampipes-service-discovery-api .................. SUCCESS [ 0.098 s]
[INFO] streampipes-dataformat-smile ....................... SUCCESS [ 0.125 s]
[INFO] streampipes-storage-api ............................ SUCCESS [ 0.129 s]
[INFO] streampipes-storage-couchdb ........................ SUCCESS [ 0.909 s]
[INFO] streampipes-storage-management ..................... SUCCESS [ 0.224 s]
[INFO] streampipes-user-management ........................ SUCCESS [ 0.671 s]
[INFO] streampipes-mail ................................... SUCCESS [ 0.228 s]
[INFO] streampipes-resource-management .................... SUCCESS [ 1.346 s]
[INFO] streampipes-service-discovery ...................... SUCCESS [ 0.148 s]
[INFO] streampipes-pipeline-management .................... SUCCESS [ 2.842 s]
[INFO] streampipes-connect-management ..................... SUCCESS [ 1.552 s]
[INFO] streampipes-extensions-management .................. SUCCESS [ 2.400 s]
[INFO] streampipes-data-explorer-commons .................. SUCCESS [ 1.928 s]
[INFO] streampipes-data-explorer .......................... SUCCESS [ 1.576 s]
[INFO] streampipes-data-export ............................ SUCCESS [ 0.328 s]
[INFO] streampipes-service-base ........................... SUCCESS [ 0.203 s]
[INFO] streampipes-rest-shared ............................ SUCCESS [ 0.156 s]
[INFO] streampipes-rest-extensions ........................ SUCCESS [ 1.005 s]
[INFO] streampipes-service-extensions ..................... SUCCESS [ 0.407 s]
[INFO] Apache StreamPipes Maven Plugin .................... SUCCESS [ 2.810 s]
[INFO] streampipes-extensions ............................. SUCCESS [ 0.007 s]
[INFO] streampipes-connectors-mqtt ........................ SUCCESS [ 0.189 s]
[INFO] streampipes-pipeline-elements-shared ............... SUCCESS [ 0.100 s]
[INFO] streampipes-connect-adapters ....................... SUCCESS [ 0.364 s]
[INFO] streampipes-connect-adapters-iiot .................. SUCCESS [ 1.726 s]
[INFO] streampipes-wrapper ................................ SUCCESS [ 0.291 s]
[INFO] StreamPipes Wrapper for Standalone Pipeline Element Implementations SUCCESS [ 0.340 s]
[INFO] streampipes-connectors-influx ...................... SUCCESS [ 0.288 s]
[INFO] streampipes-messaging-kafka ........................ SUCCESS [ 0.145 s]
[INFO] streampipes-connectors-kafka ....................... SUCCESS [ 0.274 s]
[INFO] streampipes-messaging-nats ......................... SUCCESS [ 0.110 s]
[INFO] streampipes-connectors-nats ........................ SUCCESS [ 0.162 s]
[INFO] streampipes-connectors-opcua ....................... SUCCESS [ 1.622 s]
[INFO] streampipes-connectors-pulsar ...................... SUCCESS [ 1.979 s]
[INFO] streampipes-connectors-rocketmq .................... SUCCESS [ 1.543 s]
[INFO] streampipes-connectors-tubemq ...................... SUCCESS [ 0.219 s]
[INFO] streampipes-processors-filters-jvm ................. SUCCESS [ 1.744 s]
[INFO] streampipes-connectors-plc ......................... SUCCESS [ 1.429 s]
[INFO] streampipes-messaging-mqtt ......................... SUCCESS [ 0.092 s]
[INFO] streampipes-messaging-pulsar ....................... SUCCESS [ 0.154 s]
[INFO] streampipes-wrapper-siddhi ......................... SUCCESS [ 0.469 s]
[INFO] streampipes-processors-filters-siddhi .............. SUCCESS [ 0.794 s]
[INFO] streampipes-processors-transformation-jvm .......... SUCCESS [ 3.804 s]
[INFO] streampipes-messaging-jms .......................... SUCCESS [ 0.112 s]
[INFO] streampipes-sinks-brokers-jvm ...................... SUCCESS [ 0.288 s]
[INFO] streampipes-sinks-databases-jvm .................... SUCCESS [ 0.425 s]
[INFO] streampipes-sinks-internal-jvm ..................... SUCCESS [ 1.299 s]
[INFO] streampipes-sinks-notifications-jvm ................ SUCCESS [ 1.803 s]
[INFO] streampipes-processors-enricher-jvm ................ SUCCESS [ 1.250 s]
[INFO] streampipes-processors-change-detection-jvm ........ SUCCESS [ 0.266 s]
[INFO] streampipes-extensions-all-iiot .................... SUCCESS [ 0.977 s]
[INFO] streampipes-processors-image-processing-jvm ........ SUCCESS [ 0.388 s]
[INFO] streampipes-processors-text-mining-jvm ............. SUCCESS [ 0.266 s]
[INFO] streampipes-processors-geo-jvm ..................... SUCCESS [ 0.467 s]
[INFO] streampipes-extensions-all-jvm ..................... SUCCESS [ 1.617 s]
[INFO] streampipes-extensions-iiot-minimal ................ SUCCESS [ 0.733 s]
[INFO] StreamPipes Integration Tests ...................... SUCCESS [ 27.129 s]
[INFO] streampipes-rest-core-base ......................... SUCCESS [ 0.200 s]
[INFO] StreamPipes REST API ............................... SUCCESS [ 0.550 s]
[INFO] streampipes-platform-services ...................... SUCCESS [ 0.277 s]
[INFO] streampipes-sdk-bundle ............................. SUCCESS [ 0.176 s]
[INFO] StreamPipes Core ................................... SUCCESS [ 1.304 s]
[INFO] streampipes-service-core-minimal ................... SUCCESS [ 0.308 s]
[INFO] streampipes-wrapper-distributed .................... SUCCESS [ 0.237 s]
[INFO] StreamPipes Wrapper for Apache Flink ............... SUCCESS [ 0.404 s]
[INFO] streampipes-wrapper-kafka-streams .................. SUCCESS [ 0.265 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:35 min
[INFO] Finished at: 2024-04-23T10:06:35+08:00
[INFO] ------------------------------------------------------------------------
paulo@PRED:~/ASF/streampipes$

@bossenti
Copy link
Contributor

may I ask how you normally run an individual test in intellij. I am getting this at the moment image

Can you try again after clicking Build -> Rebuild Project in IntelliJ?

@bossenti
Copy link
Contributor

Got a successful build, but I unsure if everything is all ok. since I don't know how to run an individual test: [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for Apache StreamPipes 0.95.0-SNAPSHOT: [INFO] [INFO] Apache StreamPipes ................................. SUCCESS [ 1.907 s] [INFO] streampipes-archetype-extensions-jvm ............... SUCCESS [ 0.800 s] [INFO] streampipes-archetype-pe-sinks-flink ............... SUCCESS [ 0.062 s] [INFO] streampipes-archetype-pe-processors-flink .......... SUCCESS [ 0.065 s] [INFO] StreamPipes Commons ................................ SUCCESS [ 1.453 s] [INFO] streampipes-model-shared ........................... SUCCESS [ 0.369 s] [INFO] streampipes-vocabulary ............................. SUCCESS [ 0.580 s] [INFO] streampipes-model .................................. SUCCESS [ 4.026 s] [INFO] streampipes-dataformat ............................. SUCCESS [ 0.225 s] [INFO] streampipes-messaging .............................. SUCCESS [ 0.291 s] [INFO] streampipes-client-api ............................. SUCCESS [ 0.206 s] [INFO] streampipes-dataformat-json ........................ SUCCESS [ 0.231 s] [INFO] streampipes-dataformat-cbor ........................ SUCCESS [ 0.193 s] [INFO] streampipes-dataformat-fst ......................... SUCCESS [ 0.244 s] [INFO] streampipes-security-jwt ........................... SUCCESS [ 0.281 s] [INFO] streampipes-model-client ........................... SUCCESS [ 0.376 s] [INFO] streampipes-extensions-api ......................... SUCCESS [ 0.293 s] [INFO] streampipes-test-utils ............................. SUCCESS [ 0.214 s] [INFO] streampipes-serializers-json ....................... SUCCESS [ 0.602 s] [INFO] streampipes-client ................................. SUCCESS [ 0.741 s] [INFO] streampipes-measurement-units ...................... SUCCESS [ 0.831 s] [INFO] streampipes-sdk .................................... SUCCESS [ 1.594 s] [INFO] streampipes-connect-shared ......................... SUCCESS [ 1.716 s] [INFO] streampipes-service-discovery-api .................. SUCCESS [ 0.098 s] [INFO] streampipes-dataformat-smile ....................... SUCCESS [ 0.125 s] [INFO] streampipes-storage-api ............................ SUCCESS [ 0.129 s] [INFO] streampipes-storage-couchdb ........................ SUCCESS [ 0.909 s] [INFO] streampipes-storage-management ..................... SUCCESS [ 0.224 s] [INFO] streampipes-user-management ........................ SUCCESS [ 0.671 s] [INFO] streampipes-mail ................................... SUCCESS [ 0.228 s] [INFO] streampipes-resource-management .................... SUCCESS [ 1.346 s] [INFO] streampipes-service-discovery ...................... SUCCESS [ 0.148 s] [INFO] streampipes-pipeline-management .................... SUCCESS [ 2.842 s] [INFO] streampipes-connect-management ..................... SUCCESS [ 1.552 s] [INFO] streampipes-extensions-management .................. SUCCESS [ 2.400 s] [INFO] streampipes-data-explorer-commons .................. SUCCESS [ 1.928 s] [INFO] streampipes-data-explorer .......................... SUCCESS [ 1.576 s] [INFO] streampipes-data-export ............................ SUCCESS [ 0.328 s] [INFO] streampipes-service-base ........................... SUCCESS [ 0.203 s] [INFO] streampipes-rest-shared ............................ SUCCESS [ 0.156 s] [INFO] streampipes-rest-extensions ........................ SUCCESS [ 1.005 s] [INFO] streampipes-service-extensions ..................... SUCCESS [ 0.407 s] [INFO] Apache StreamPipes Maven Plugin .................... SUCCESS [ 2.810 s] [INFO] streampipes-extensions ............................. SUCCESS [ 0.007 s] [INFO] streampipes-connectors-mqtt ........................ SUCCESS [ 0.189 s] [INFO] streampipes-pipeline-elements-shared ............... SUCCESS [ 0.100 s] [INFO] streampipes-connect-adapters ....................... SUCCESS [ 0.364 s] [INFO] streampipes-connect-adapters-iiot .................. SUCCESS [ 1.726 s] [INFO] streampipes-wrapper ................................ SUCCESS [ 0.291 s] [INFO] StreamPipes Wrapper for Standalone Pipeline Element Implementations SUCCESS [ 0.340 s] [INFO] streampipes-connectors-influx ...................... SUCCESS [ 0.288 s] [INFO] streampipes-messaging-kafka ........................ SUCCESS [ 0.145 s] [INFO] streampipes-connectors-kafka ....................... SUCCESS [ 0.274 s] [INFO] streampipes-messaging-nats ......................... SUCCESS [ 0.110 s] [INFO] streampipes-connectors-nats ........................ SUCCESS [ 0.162 s] [INFO] streampipes-connectors-opcua ....................... SUCCESS [ 1.622 s] [INFO] streampipes-connectors-pulsar ...................... SUCCESS [ 1.979 s] [INFO] streampipes-connectors-rocketmq .................... SUCCESS [ 1.543 s] [INFO] streampipes-connectors-tubemq ...................... SUCCESS [ 0.219 s] [INFO] streampipes-processors-filters-jvm ................. SUCCESS [ 1.744 s] [INFO] streampipes-connectors-plc ......................... SUCCESS [ 1.429 s] [INFO] streampipes-messaging-mqtt ......................... SUCCESS [ 0.092 s] [INFO] streampipes-messaging-pulsar ....................... SUCCESS [ 0.154 s] [INFO] streampipes-wrapper-siddhi ......................... SUCCESS [ 0.469 s] [INFO] streampipes-processors-filters-siddhi .............. SUCCESS [ 0.794 s] [INFO] streampipes-processors-transformation-jvm .......... SUCCESS [ 3.804 s] [INFO] streampipes-messaging-jms .......................... SUCCESS [ 0.112 s] [INFO] streampipes-sinks-brokers-jvm ...................... SUCCESS [ 0.288 s] [INFO] streampipes-sinks-databases-jvm .................... SUCCESS [ 0.425 s] [INFO] streampipes-sinks-internal-jvm ..................... SUCCESS [ 1.299 s] [INFO] streampipes-sinks-notifications-jvm ................ SUCCESS [ 1.803 s] [INFO] streampipes-processors-enricher-jvm ................ SUCCESS [ 1.250 s] [INFO] streampipes-processors-change-detection-jvm ........ SUCCESS [ 0.266 s] [INFO] streampipes-extensions-all-iiot .................... SUCCESS [ 0.977 s] [INFO] streampipes-processors-image-processing-jvm ........ SUCCESS [ 0.388 s] [INFO] streampipes-processors-text-mining-jvm ............. SUCCESS [ 0.266 s] [INFO] streampipes-processors-geo-jvm ..................... SUCCESS [ 0.467 s] [INFO] streampipes-extensions-all-jvm ..................... SUCCESS [ 1.617 s] [INFO] streampipes-extensions-iiot-minimal ................ SUCCESS [ 0.733 s] [INFO] StreamPipes Integration Tests ...................... SUCCESS [ 27.129 s] [INFO] streampipes-rest-core-base ......................... SUCCESS [ 0.200 s] [INFO] StreamPipes REST API ............................... SUCCESS [ 0.550 s] [INFO] streampipes-platform-services ...................... SUCCESS [ 0.277 s] [INFO] streampipes-sdk-bundle ............................. SUCCESS [ 0.176 s] [INFO] StreamPipes Core ................................... SUCCESS [ 1.304 s] [INFO] streampipes-service-core-minimal ................... SUCCESS [ 0.308 s] [INFO] streampipes-wrapper-distributed .................... SUCCESS [ 0.237 s] [INFO] StreamPipes Wrapper for Apache Flink ............... SUCCESS [ 0.404 s] [INFO] streampipes-wrapper-kafka-streams .................. SUCCESS [ 0.265 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:35 min [INFO] Finished at: 2024-04-23T10:06:35+08:00 [INFO] ------------------------------------------------------------------------ paulo@PRED:~/ASF/streampipes$

This is great! Tests should run successfully, you can create a PR now, the CI will run the tests as well :)

@pambrocio
Copy link

getting this when pushing my branch

ERROR: Permission to apache/streampipes.git denied to pambrocio.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

@bossenti
Copy link
Contributor

This is expected, since you don't have write access to our repository 🙂

You need to create a fork of our repository, push your branch there and then create a PR from your fork to our repository.
You can find more details here if required

@pambrocio
Copy link

PR
#2758

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 a pull request may close this issue.

3 participants