openshift-online / maestro

Maestro Service Repo
Apache License 2.0
8 stars 15 forks source link

Make integration test stable #64

Closed clyang82 closed 3 months ago

clyang82 commented 3 months ago
  1. do not need to re-create DB for each test. Just cleanup the table contents instead.
  2. fix concurrent map writes by adding sync lock As per golang doc:

    Map access is unsafe only when updates are occurring. As long as all goroutines are only reading—looking up elements in the map, including iterating through it using a for range loop—and not changing the map by assigning to elements or doing deletions, it is safe for them to access the map concurrently without synchronization.

  3. adopt fix https://github.com/open-cluster-management-io/sdk-go/pull/26