-
Notifications
You must be signed in to change notification settings - Fork 50
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
Conversation
@@ -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> { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add @deprecated
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅
No description provided.