Mulai 27 Maret 2025, sebaiknya gunakan android-latest-release
, bukan aosp-main
, untuk mem-build dan berkontribusi pada AOSP. Untuk mengetahui informasi selengkapnya, lihat Perubahan pada AOSP.
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
MergeStrategy
public
final
enum
MergeStrategy
extends Enum<MergeStrategy>
Menjelaskan cara agregasi hasil jika ada beberapa upaya.
Ringkasan
Nilai enum |
MergeStrategy |
ANY_FAIL_IS_FAIL
Jika satu kasus pengujian atau operasi berjalan gagal, status akan gagal, apa pun yang terjadi.
|
MergeStrategy |
ANY_PASS_IS_PASS
Jika satu kasus pengujian atau operasi berjalan berhasil, kami akan menganggap hasil gabungan lulus.
|
MergeStrategy |
NO_MERGE
Penggabungan tidak boleh diterapkan dan akan menampilkan pengecualian.
|
MergeStrategy |
ONE_TESTCASE_PASS_IS_PASS
Jika satu kasus pengujian lulus, kami akan menganggap hasil gabungan lulus.
|
MergeStrategy |
ONE_TESTRUN_PASS_IS_PASS
Jika satu pengujian lulus, kami akan menganggap hasil pengujian gabungan lulus.
|
Nilai enum
ANY_FAIL_IS_FAIL
public static final MergeStrategy ANY_FAIL_IS_FAIL
Jika satu kasus pengujian atau operasi berjalan gagal, status akan gagal, apa pun yang terjadi.
ANY_PASS_IS_PASS
public static final MergeStrategy ANY_PASS_IS_PASS
Jika satu kasus pengujian atau operasi berjalan berhasil, kami akan menganggap hasil gabungan lulus.
NO_MERGE
public static final MergeStrategy NO_MERGE
Penggabungan tidak boleh diterapkan dan akan menampilkan pengecualian.
ONE_TESTCASE_PASS_IS_PASS
public static final MergeStrategy ONE_TESTCASE_PASS_IS_PASS
Jika satu kasus pengujian lulus, kami akan menganggap hasil gabungan lulus.
ONE_TESTRUN_PASS_IS_PASS
public static final MergeStrategy ONE_TESTRUN_PASS_IS_PASS
Jika satu pengujian lulus, kami akan menganggap hasil pengujian gabungan lulus.
Metode publik
getMergeStrategy
public static MergeStrategy getMergeStrategy (RetryStrategy retryStrategy)
Buat strategi penggabungan berdasarkan strategi percobaan ulang.
Parameter |
retryStrategy |
RetryStrategy |
Konten dan contoh kode di halaman ini tunduk kepada lisensi yang dijelaskan dalam Lisensi Konten. Java dan OpenJDK adalah merek dagang atau merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-27 UTC.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-07-27 UTC."],[],[],null,["# MergeStrategy\n=============\n\n\n`\npublic\n\nfinal\n\nenum\nMergeStrategy\n`\n\n\n`\n\n\n`\n\n`\n\nextends Enum\u003c`[MergeStrategy](../../../../../../reference/tradefed/com/android/tradefed/retry/MergeStrategy.html)`\u003e\n\n\n`\n\n`\n\n\n`\n\n|---|---|------------------------------------------|\n| java.lang.Object |||\n| ↳ | java.lang.Enum\\\u003c[com.android.tradefed.retry.MergeStrategy](../../../../../../reference/tradefed/com/android/tradefed/retry/MergeStrategy.html)\\\u003e ||\n| | ↳ | com.android.tradefed.retry.MergeStrategy |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nDescribes how the results should be aggregated when multiple attempts are present.\n\nSummary\n-------\n\n| ### Enum values ||\n|-----------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [MergeStrategy](../../../../../../reference/tradefed/com/android/tradefed/retry/MergeStrategy.html) | `ANY_FAIL_IS_FAIL` If a single run or test cases is failed, status will be failed no matter what. |\n| [MergeStrategy](../../../../../../reference/tradefed/com/android/tradefed/retry/MergeStrategy.html) | `ANY_PASS_IS_PASS` If a single run or test cases is a pass we will consider the merged results passed. |\n| [MergeStrategy](../../../../../../reference/tradefed/com/android/tradefed/retry/MergeStrategy.html) | `NO_MERGE` Merging should not be applied and will throw an exception. |\n| [MergeStrategy](../../../../../../reference/tradefed/com/android/tradefed/retry/MergeStrategy.html) | `ONE_TESTCASE_PASS_IS_PASS` If a single test case pass then we will consider the merged result passed. |\n| [MergeStrategy](../../../../../../reference/tradefed/com/android/tradefed/retry/MergeStrategy.html) | `ONE_TESTRUN_PASS_IS_PASS` If a single test run pass then we will consider the merged run result passed. |\n\n| ### Public methods ||\n|-----------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` static `[MergeStrategy](../../../../../../reference/tradefed/com/android/tradefed/retry/MergeStrategy.html) | ` `[getMergeStrategy](../../../../../../reference/tradefed/com/android/tradefed/retry/MergeStrategy.html#getMergeStrategy(com.android.tradefed.retry.RetryStrategy))`(`[RetryStrategy](../../../../../../reference/tradefed/com/android/tradefed/retry/RetryStrategy.html)` retryStrategy) ` Create a merge strategy based on the retry strategy. |\n| ` static `[MergeStrategy](../../../../../../reference/tradefed/com/android/tradefed/retry/MergeStrategy.html) | ` `[valueOf](../../../../../../reference/tradefed/com/android/tradefed/retry/MergeStrategy.html#valueOf(java.lang.String))`(String name) ` |\n| ` static final `[MergeStrategy[]](../../../../../../reference/tradefed/com/android/tradefed/retry/MergeStrategy.html) | ` `[values](../../../../../../reference/tradefed/com/android/tradefed/retry/MergeStrategy.html#values())`() ` |\n\nEnum values\n-----------\n\n### ANY_FAIL_IS_FAIL\n\n```\npublic static final MergeStrategy ANY_FAIL_IS_FAIL\n```\n\nIf a single run or test cases is failed, status will be failed no matter what.\n\n\u003cbr /\u003e\n\n### ANY_PASS_IS_PASS\n\n```\npublic static final MergeStrategy ANY_PASS_IS_PASS\n```\n\nIf a single run or test cases is a pass we will consider the merged results passed.\n\n\u003cbr /\u003e\n\n### NO_MERGE\n\n```\npublic static final MergeStrategy NO_MERGE\n```\n\nMerging should not be applied and will throw an exception.\n\n\u003cbr /\u003e\n\n### ONE_TESTCASE_PASS_IS_PASS\n\n```\npublic static final MergeStrategy ONE_TESTCASE_PASS_IS_PASS\n```\n\nIf a single test case pass then we will consider the merged result passed.\n\n\u003cbr /\u003e\n\n### ONE_TESTRUN_PASS_IS_PASS\n\n```\npublic static final MergeStrategy ONE_TESTRUN_PASS_IS_PASS\n```\n\nIf a single test run pass then we will consider the merged run result passed.\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### getMergeStrategy\n\n```\npublic static MergeStrategy getMergeStrategy (RetryStrategy retryStrategy)\n```\n\nCreate a merge strategy based on the retry strategy.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-----------------|------------------------|\n| `retryStrategy` | `RetryStrategy` \u003cbr /\u003e |\n\n| Returns ||\n|-----------------------------------------------------------------------------------------------------|--------|\n| [MergeStrategy](../../../../../../reference/tradefed/com/android/tradefed/retry/MergeStrategy.html) | \u003cbr /\u003e |\n\n### valueOf\n\n```\npublic static MergeStrategy valueOf (String name)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------|-----------------|\n| `name` | `String` \u003cbr /\u003e |\n\n| Returns ||\n|-----------------------------------------------------------------------------------------------------|--------|\n| [MergeStrategy](../../../../../../reference/tradefed/com/android/tradefed/retry/MergeStrategy.html) | \u003cbr /\u003e |\n\n### values\n\n```\npublic static final MergeStrategy[] values ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------------------------------------------------------------------------------------------------------|--------|\n| [MergeStrategy[]](../../../../../../reference/tradefed/com/android/tradefed/retry/MergeStrategy.html) | \u003cbr /\u003e |"]]