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

MBS-11465 runner execution timeout #1165

Merged
merged 13 commits into from
Aug 12, 2021

Conversation

RuslanMingaliev
Copy link
Contributor

No description provided.

@@ -129,7 +129,7 @@ internal class DeviceWorker(
stateWorker.clearPackages(currentState)
}.map { intendedState }

private fun executeAction(action: InstrumentationTestRunAction): Result<DeviceTestCaseRun> {
private suspend fun executeAction(action: InstrumentationTestRunAction): Result<DeviceTestCaseRun> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need the suspend there?

Copy link
Contributor

Choose a reason for hiding this comment

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

Understand

action: InstrumentationTestRunAction,
outputDir: File
): DeviceTestCaseRun {
// simulating test execution
Copy link
Contributor

Choose a reason for hiding this comment

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

Propose to delete this obvious comment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -17,7 +17,11 @@ public abstract class InstrumentationConfiguration(public val name: String) {

public var kubernetesNamespace: String = "default"

public var timeoutInSeconds: Long = TimeUnit.MINUTES.toSeconds(100)
public var timeoutInSeconds: Long = 120L // TODO: remove after MBS-11465
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -284,7 +284,8 @@ public class InstrumentationTestsPlugin : Plugin<Project> {
kubernetesNamespace = configuration.kubernetesNamespace,
targets = getTargets(configuration, mergedInstrumentationParameters),
enableDeviceDebug = configuration.enableDeviceDebug,
timeoutInSeconds = configuration.timeoutInSeconds,
testRunnerExecutionTimeout = configuration.testRunnerExecutionTimeout,
gradleTaskTimeout = configuration.gradleTaskTimeout,
Copy link
Contributor

Choose a reason for hiding this comment

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

instrumentationTaskTimeout
gradleTask is too general description

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -65,6 +69,8 @@ internal class RunnerIntegrationTest {
minimumFailedCount = 0
)
private val loggerFactory = StubLoggerFactory
private val <E> Channel<E>.isClosedForSendAndReceive: Boolean
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's move it to place where it's used

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved this extension to :common:coroutines-extension. It seems to be the correct place for this property.

logger.critical("Test run end with error", e)
Result.Failure(e)
} finally {
logger.debug("Test run finally block called")
Copy link
Contributor

Choose a reason for hiding this comment

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

Delete

Copy link
Contributor Author

Choose a reason for hiding this comment

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

testSuiteListener.onTestSuiteFinished()
logger.info("Test run end successfully")
Result.Success(result)
} catch (e: Throwable) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Will we get the TimeoutException there? If will maybe make the different log message

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we will. Changed the message for timeout

Copy link
Contributor

Choose a reason for hiding this comment

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

Expect to see multiple catch blocks but you decide do you want to rewrite this code again

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@RuslanMingaliev RuslanMingaliev merged commit 1f10403 into develop Aug 12, 2021
@RuslanMingaliev RuslanMingaliev deleted the MBS-11465-runner-execution-timeout branch August 12, 2021 08:45
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.

2 participants