Skip to content

Python and Java Tests with E2E testing Framework #354

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

Merged
merged 48 commits into from
Oct 17, 2022
Merged

Conversation

jainharsh98
Copy link
Contributor

@jainharsh98 jainharsh98 commented Jun 21, 2022

Adds a framework for testing the extension with azure functions across different languages with managed kafka offerings.

Current PR adds test cases for -

  1. Confluent
  2. Eventhub

and Languages -

  1. Java
  2. Python

shrohilla and others added 19 commits March 2, 2022 10:03
Language End to End Testing for PR
* Adding Async Functions

* Adding Get Http call

* Added Single Event Test Function App for Dotnet

* Added Dockerfile and Multi Kafka Trigger in dotnet

* Updated Multi Kafka Output Binding in dotnet

* Testing Http and Command Utilities

* Cleaning implementation

* Adding Constants and BrokerType

* Adding env flag in docker commands

* Correcting Dotnet Confluent Dockerfile

* Removing dependence of Apptype from initialization code

* Adding Test Assert

* Renaming Python Test to include BrokerType

* Adding Env Variables for Eventhub

* Adding Python Constants and env variables

* Removing FunctionsApps from Build

* Fixing Build Issues

* Correcting Dotnet Functions Apps

* Removing Extra Python App

Co-authored-by: krishna-kariya <kkariya@microsoft.com>
Co-authored-by: krishna-kariya <89184055+krishna-kariya@users.noreply.github.com>
* Adding Process Manager and Cleanup Class

* Making response list private

* Added and Tested Python Apps

* Adding Java Test Cases

* Adding Env Variables to Azure Pipeline

* Commenting Unit Test

* Docker Build for python and java local broker test

* Commenting Old Language Tests

* Commenting Local Kafka Startup

* Adding Http log and Powershell command

* Adding additional logs for eventhub

* Modifying Ubuntu Command in pipeline

* Modifying Process Executor for Linux environments

* Adding additional tests and correcting function app

* Changing Eventhub Namespace

* Adding semaphore for eventhub client access

* Allowing Max threads for async operations

* Correcting Dotnet Isolated Functions

* Commenting old docker builds

* Commenting old docker builds

* Correcting Mistake in dotnet isolated csproj

* Adding logs for http request response

* Adding exception logging for function invocation

* Code Cleanup

* Correcting Azure Pipeline

* Updating dotnet isolated function apps

* mend

* Uncommenting DotnetIsolated Confluent Test and changing Port number

* Changing Typescript Eventhub app port to a random port

Co-authored-by: krishna-kariya <kkariya@microsoft.com>
@shrohilla
Copy link
Contributor

shrohilla commented Jun 29, 2022

@jainharsh98 build is failing please fix that

Could you please add the context in the description what exactly is the scope of this PR.

@shrohilla
Copy link
Contributor

@jainharsh98 Could you please add a readme file for the E2E understanding for configs setup for local

@shrohilla
Copy link
Contributor

  • Across all the files we are currently using Console.writeline, can we move them on Logger if possible ??
  • Can we add comments over the files to know the complete scope
  • Can we add the ReadMe file for understanding the configuration required for local setup for a new user

/* Provides a static logger instance for logging throughout the framework.
* This is needed as xunit framework does not support dependency injection directly.
*/
internal static class TestLogger
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you intend to make this a singleton class? In that case you can create it as a singleton pattern.You can keep class as non-static.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. We are planning to have a separate work item for logging improvement.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Logger needs to be improved with thi PR only, this logger looks incomplete and doesn't holds the guarantees of debugging the test

_queueType = queueType;
_queueName = queueName;
_queueOperation = queueOperation;
if (QueueType.EventHub == queueType)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

L22-29 looks like a factory pattern approach shall we refactor this to a factory class ??

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. We can take this up in the improvement task.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's a small task can be taken care in the same PR

Copy link
Contributor

@shrohilla shrohilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logger functionality is not sufficient, let's fix that in the same PR

@ghost
Copy link

ghost commented Sep 20, 2022

This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment.

Copy link
Contributor

@lpapudippu lpapudippu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@lpapudippu lpapudippu merged commit 6ef333b into dev Oct 17, 2022
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.

4 participants