Bird
0
0

Identify the error in this migration snippet:

medium📝 Analysis Q6 of 15
Microservices - Migration from Monolith
Identify the error in this migration snippet:
services = ['auth', 'payment']
migrated = []
for s in services:
    migrate(s)
    migrated.append(s)
    test(s)
AAppending to migrated list is unnecessary
BMigration should happen after testing
CThe list 'services' should be empty
DTesting should happen before appending to migrated list
Step-by-Step Solution
Solution:
  1. Step 1: Review migration and testing order

    Testing should confirm success before marking service as migrated.
  2. Step 2: Identify correct sequence

    Appending to migrated list should occur only after successful testing.
  3. Final Answer:

    Testing should happen before appending to migrated list -> Option D
  4. Quick Check:

    Test before marking migrated = D [OK]
Quick Trick: Test success before confirming migration [OK]
Common Mistakes:
  • Appending before testing
  • Testing after migration
  • Ignoring test results

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Microservices Quizzes