Class: Google::Apis::TestingV1::UniformSharding

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/testing_v1/classes.rb,
lib/google/apis/testing_v1/representations.rb,
lib/google/apis/testing_v1/representations.rb

Overview

Uniformly shards test cases given a total number of shards. For instrumentation tests, it will be translated to "-e numShard" and "-e shardIndex" AndroidJUnitRunner arguments. With uniform sharding enabled, specifying either of these sharding arguments via environment_variables is invalid. Based on the sharding mechanism AndroidJUnitRunner uses, there is no guarantee that test cases will be distributed uniformly across all shards.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ UniformSharding

Returns a new instance of UniformSharding.



3082
3083
3084
# File 'lib/google/apis/testing_v1/classes.rb', line 3082

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#num_shardsFixnum

Required. The total number of shards to create. This must always be a positive number that is no greater than the total number of test cases. When you select one or more physical devices, the number of shards must be <= 50. When you select one or more ARM virtual devices, it must be <= 100. When you select only x86 virtual devices, it must be <= 500. Corresponds to the JSON property numShards

Returns:

  • (Fixnum)


3080
3081
3082
# File 'lib/google/apis/testing_v1/classes.rb', line 3080

def num_shards
  @num_shards
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3087
3088
3089
# File 'lib/google/apis/testing_v1/classes.rb', line 3087

def update!(**args)
  @num_shards = args[:num_shards] if args.key?(:num_shards)
end