Harmonize `testAdapter` and `addAdapter` Methods in `ConnectUtils`
Body
The methods testAdapter, startAdapter and addAdapter in the ConnectUtils class are highly similar in functionality. To improve maintainability and reduce redundancy, these methods should be reviewed and harmonized into a unified implementation where possible.
StreamPipes Committer
I acknowledge that I am a maintainer/committer of the Apache StreamPipes project.
@tenthe What do you mean by 'harmonize'? Can I just make a new method say setupAdapterConfiguration and move all the common logic in this method and implement this method in the testAdapter and startAdapter? Does this work fine?
Hi @Suvrat1629,
thanks for getting in touch.
The idea of the issue is to clean up the code in the ConnectUtils. The methods have been created over time but are very similar. It would be good to have one or more expressive methods where it is clear what is happening and how they can be used.
Have you ever worked with cypress tests? Or have you ever run the tests for StreamPipes locally?
You are also welcome to look at where the methods are used and then make a suggestion on how to improve the API.
Cheers, Philipp
@tenthe
It would be good to have one or more expressive methods where it is clear what is happening and how they can be used.
Yes, I did notice that while going through the code which is why i proposed to move all the setup logic of the adapter in one method.
Have you ever worked with cypress tests? Or have you ever run the tests for StreamPipes locally?
I have worked with cypress before but not so much, although I haven't run the StreamPipes tests locally (my system isnt really a fan of test cases, it cannot bear with the heat) but I was working on an old good-first-issue which deals with test cases.(I will open a pr for this shortly)
You are also welcome to look at where the methods are used and then make a suggestion on how to improve the API.
I did take a look at the various places these methods were used but I am new to the code base so I lack a bit of understanding about what exactly is happening here.
@tenthe I noticed that there are a lot of pending 'good-first-issue' from 2023 is it ok if open prs for them without asking for assignment?
Sure, you are welcome to work on the issues. Just open a PR